-----------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\C
> h3.log
  log type:  text
 opened on:  26 Jul 2023, 15:57:23

. 
.         ******************************
.         **** Set directory, seed *****
.         ******************************
.                 set more off 

.                 set matsize 1000
set matsize ignored.
    Matrix sizes are no longer limited by c(matsize) in modern Statas.  Matrix
    sizes are now limited by edition of Stata.  See limits for more details.

.                 global seed ="984353"

.                 set scheme plotplain

.                 cd "$dir"
C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction

.  
.                 net from http://radyakin.org/transfer/usespss/beta   /* translate
> s SPSS data to .dta for Stata */
-----------------------------------------------------------------------------------
http://radyakin.org/transfer/usespss/beta/
(no title)
-----------------------------------------------------------------------------------

PACKAGES you could -net describe-:
    usespss           usespss.pkg Import data in SPSS (*.sav) data format !BETA!
-----------------------------------------------------------------------------------

.         *************************************************************************
> ***********************************
.         ****  How are personalist parties organized? support group, funders, and 
> nominations and local strength ****
.         *************************************************************************
> ***********************************
.                         use pers-use,clear

.                         global d = "persparty"

.                         gen proportional= v2elparlel==1 | v2elparlel==3

.                         gen mixed =  v2elparlel==2

.                         gen s = year==min | v2xel_elecpres==1|  v2xel_elecparl==1

.                         
.                         *** Funded by party leader ***
.                         sum v2pafunds_6 

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
 v2pafunds_6 |      2,239    .1703234    .2833199          0          1

.                         xi:glm v2pafunds_6 i.period $d if s==1,fam(bin)link(probi
> t)cluster(cowcode)                     
i.period          _Iperiod_1-6        (naturally coded; _Iperiod_1 omitted)
note: v2pafunds_6 has noninteger values

Iteration 0:  Log pseudolikelihood = -398.25745  
Iteration 1:  Log pseudolikelihood =  -394.2609  
Iteration 2:  Log pseudolikelihood = -394.25606  
Iteration 3:  Log pseudolikelihood = -394.25606  

Generalized linear models                         Number of obs   =      1,120
Optimization     : ML                             Residual df     =      1,113
                                                  Scale parameter =          1
Deviance         =  532.3767471                   (1/df) Deviance =   .4783259
Pearson          =  590.6128942                   (1/df) Pearson  =   .5306495

Variance function: V(u) = u*(1-u/1)               [Binomial]
Link function    : g(u) = invnorm(u)              [Probit]

                                                  AIC             =   .7165287
Log pseudolikelihood = -394.2560647               BIC             =   -7282.09

                              (Std. err. adjusted for 101 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
 v2pafunds_6 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
  _Iperiod_2 |   .1895924   .1162999     1.63   0.103    -.0383513    .4175361
  _Iperiod_3 |    .182874   .1126035     1.62   0.104    -.0378247    .4035728
  _Iperiod_4 |   .1681701   .1347221     1.25   0.212    -.0958804    .4322207
  _Iperiod_5 |   .2233955   .1388767     1.61   0.108    -.0487978    .4955889
  _Iperiod_6 |   .2788588   .1570126     1.78   0.076    -.0288802    .5865979
   persparty |   1.468591   .3647846     4.03   0.000      .753626    2.183555
       _cons |  -1.998731   .2517062    -7.94   0.000    -2.492066   -1.505396
------------------------------------------------------------------------------

.                         margins,dydx($d)

Average marginal effects                                 Number of obs = 1,120
Model VCE: Robust

Expression: Predicted mean v2pafunds_6, predict()
dy/dx wrt:  persparty

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |   .3321748   .0794466     4.18   0.000     .1764624    .4878872
------------------------------------------------------------------------------

.                         est store org1

.                         xi:glm v2pafunds_6 i.pregion i.period proportional mixed 
> pres ivdem ld $d if s==1,fam(bin)link(probit)cluster(cowcode)  
i.pregion         _Ipregion_1-6       (naturally coded; _Ipregion_1 omitted)
i.period          _Iperiod_1-6        (naturally coded; _Iperiod_1 omitted)
note: v2pafunds_6 has noninteger values

Iteration 0:  Log pseudolikelihood = -333.03585  
Iteration 1:  Log pseudolikelihood =  -313.4686  
Iteration 2:  Log pseudolikelihood = -312.85586  
Iteration 3:  Log pseudolikelihood = -312.85237  
Iteration 4:  Log pseudolikelihood = -312.85237  

Generalized linear models                         Number of obs   =      1,120
Optimization     : ML                             Residual df     =      1,103
                                                  Scale parameter =          1
Deviance         =  369.5693559                   (1/df) Deviance =   .3350583
Pearson          =   483.002744                   (1/df) Pearson  =   .4378991

Variance function: V(u) = u*(1-u/1)               [Binomial]
Link function    : g(u) = invnorm(u)              [Probit]

                                                  AIC             =   .5890221
Log pseudolikelihood = -312.8523691               BIC             =  -7374.686

                              (Std. err. adjusted for 101 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
 v2pafunds_6 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
 _Ipregion_2 |  -.5099956   .3038202    -1.68   0.093    -1.105472     .085481
 _Ipregion_3 |  -.8764177   .4777873    -1.83   0.067    -1.812864    .0600282
 _Ipregion_4 |   .2692557   .3082585     0.87   0.382    -.3349198    .8734313
 _Ipregion_5 |  -.9786966   .4680572    -2.09   0.037    -1.896072   -.0613214
 _Ipregion_6 |  -.0024005   .3277998    -0.01   0.994    -.6448763    .6400754
  _Iperiod_2 |   .1027226   .1290059     0.80   0.426    -.1501243    .3555696
  _Iperiod_3 |   .1545469   .1575909     0.98   0.327    -.1543255    .4634194
  _Iperiod_4 |   .0985463   .1899876     0.52   0.604    -.2738224    .4709151
  _Iperiod_5 |    .088746   .1972134     0.45   0.653     -.297785    .4752771
  _Iperiod_6 |   .1652687   .2239431     0.74   0.461    -.2736517    .6041891
proportional |  -.2491371   .1924689    -1.29   0.196    -.6263692    .1280951
       mixed |  -.2084259   .1677481    -1.24   0.214    -.5372062    .1203543
        pres |   .5039594   .2502228     2.01   0.044     .0135318    .9943871
       ivdem |  -2.040637   .5439757    -3.75   0.000     -3.10681   -.9744641
          ld |    .094244   .0953838     0.99   0.323    -.0927048    .2811927
   persparty |   .6456887   .3282141     1.97   0.049     .0024009    1.288976
       _cons |  -.2547387   .4751504    -0.54   0.592    -1.186016     .676539
------------------------------------------------------------------------------

.                         margins,dydx($d)

Average marginal effects                                 Number of obs = 1,120
Model VCE: Robust

Expression: Predicted mean v2pafunds_6, predict()
dy/dx wrt:  persparty

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |   .1200895   .0608342     1.97   0.048     .0008567    .2393223
------------------------------------------------------------------------------

.                         est store org2

.                         twoway (hist persparty,col(gs12)yscale(range(0 12)axis(2)
> )yaxis(2)bin(50) ///
>                                 ylab(0 "",axis(2)nolabels noticks) ytitle("",axis
> (2)) yscale(range(0 100)axis(2))) ///
>                                 (lpolyci v2pafunds_6 persparty if s==1,bw(.175) y
> title(Leader funds party) ///
>                                  yscale(alt)yscale(range(0.25))ylab(.0(0.1)0.3, a
> xis(1)) ///
>                                 xtit(Party personalism)legend(off)tit(Leader fund
> s party,size(large)) saving(h1.gph,replace) ///
>                                 yline(.1706446,lcol(blue*.5))  text(.1795 .3 "Lea
> der funds mean",size(vsmall)))
(file h1.gph not found)
file h1.gph saved

.                         xi:glm v2pafunds_6 i.pregion i.period proportional mixed 
> pres ivdem ld $d i_populism ///
>                                 if s==1,fam(bin)link(logit)cluster(cowcode)     
i.pregion         _Ipregion_1-6       (naturally coded; _Ipregion_1 omitted)
i.period          _Iperiod_1-6        (naturally coded; _Iperiod_1 omitted)
note: v2pafunds_6 has noninteger values

Iteration 0:  Log pseudolikelihood = -336.79748  
Iteration 1:  Log pseudolikelihood = -314.82425  
Iteration 2:  Log pseudolikelihood = -313.44775  
Iteration 3:  Log pseudolikelihood =  -313.4294  
Iteration 4:  Log pseudolikelihood = -313.42938  

Generalized linear models                         Number of obs   =      1,120
Optimization     : ML                             Residual df     =      1,102
                                                  Scale parameter =          1
Deviance         =  370.7233872                   (1/df) Deviance =   .3364096
Pearson          =  488.4878259                   (1/df) Pearson  =   .4432739

Variance function: V(u) = u*(1-u/1)               [Binomial]
Link function    : g(u) = ln(u/(1-u))             [Logit]

                                                  AIC             =   .5918382
Log pseudolikelihood = -313.4293848               BIC             =  -7366.511

                              (Std. err. adjusted for 101 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
 v2pafunds_6 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
 _Ipregion_2 |  -.9689792   .5373797    -1.80   0.071    -2.022224    .0842656
 _Ipregion_3 |  -1.605546   .9541777    -1.68   0.092      -3.4757     .264608
 _Ipregion_4 |   .3666776   .5328942     0.69   0.491    -.6777758    1.411131
 _Ipregion_5 |  -2.195792   1.018247    -2.16   0.031    -4.191519   -.2000655
 _Ipregion_6 |  -.0452761   .5937291    -0.08   0.939    -1.208964    1.118412
  _Iperiod_2 |   .2235545   .2511211     0.89   0.373    -.2686338    .7157427
  _Iperiod_3 |   .2964826   .3083139     0.96   0.336    -.3078016    .9007668
  _Iperiod_4 |    .179596   .3614077     0.50   0.619      -.52875     .887942
  _Iperiod_5 |   .2108598   .3853983     0.55   0.584     -.544507    .9662265
  _Iperiod_6 |   .3429791   .4340728     0.79   0.429     -.507788    1.193746
proportional |  -.4364952   .3492308    -1.25   0.211    -1.120975    .2479847
       mixed |    -.37577   .2920112    -1.29   0.198    -.9481015    .1965615
        pres |   .9238473   .4664382     1.98   0.048     .0096452    1.838049
       ivdem |  -3.505988   .9347929    -3.75   0.000    -5.338148   -1.673827
          ld |   .1380534   .1729154     0.80   0.425    -.2008546    .4769613
   persparty |   1.085228   .6193426     1.75   0.080    -.1286607    2.299118
  i_populism |  -.0674584   .4299244    -0.16   0.875    -.9100947    .7751778
       _cons |  -.3264604   .8293409    -0.39   0.694    -1.951939    1.299018
------------------------------------------------------------------------------

.                         est store porg1

.                         margins,dydx($d i_populism)

Average marginal effects                                 Number of obs = 1,120
Model VCE: Robust

Expression: Predicted mean v2pafunds_6, predict()
dy/dx wrt:  persparty i_populism

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |   .1133093   .0640019     1.77   0.077    -.0121321    .2387507
  i_populism |  -.0070434   .0448813    -0.16   0.875    -.0950091    .0809224
------------------------------------------------------------------------------

.                         
.                         ***  Party nominations controlled by leader ***
.                         gen leadcontrol =  v2panom_ord==0 if v2panom_ord~=.
(149 missing values generated)

.                         tab  v2elloelsy leadcontrol

     Lower |
   chamber |
 electoral |
system --- |
        13 |      leadcontrol
categories |         0          1 |     Total
-----------+----------------------+----------
         0 |       322         21 |       343 
         1 |       111          6 |       117 
         2 |        30          0 |        30 
         3 |        27          4 |        31 
         5 |       251         44 |       295 
         6 |       162         23 |       185 
         7 |       385         68 |       453 
         8 |       717         37 |       754 
         9 |        30          0 |        30 
        10 |         5          0 |         5 
-----------+----------------------+----------
     Total |     2,040        203 |     2,243 

.                         gen sys =v2elloelsy

.                         recode sys (2=1) (3=4)(9 10=8)
(131 changes made to sys)

.                         xi:glm leadcontrol i.period $d if s==1,fam(bin)link(probi
> t)cluster(cowcode)                     
i.period          _Iperiod_1-6        (naturally coded; _Iperiod_1 omitted)

Iteration 0:  Log pseudolikelihood = -308.16898  
Iteration 1:  Log pseudolikelihood = -291.97636  
Iteration 2:  Log pseudolikelihood = -291.92758  
Iteration 3:  Log pseudolikelihood = -291.92757  

Generalized linear models                         Number of obs   =      1,122
Optimization     : ML                             Residual df     =      1,115
                                                  Scale parameter =          1
Deviance         =  583.8551479                   (1/df) Deviance =   .5236369
Pearson          =   1158.95334                   (1/df) Pearson  =    1.03942

Variance function: V(u) = u*(1-u/1)               [Binomial]
Link function    : g(u) = invnorm(u)              [Probit]

                                                  AIC             =   .5328477
Log pseudolikelihood =  -291.927574               BIC             =  -7246.643

                              (Std. err. adjusted for 101 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
 leadcontrol | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
  _Iperiod_2 |   .2472356   .1669697     1.48   0.139     -.080019    .5744901
  _Iperiod_3 |   .0169575   .1999025     0.08   0.932    -.3748441    .4087592
  _Iperiod_4 |  -.1575055   .2060331    -0.76   0.445    -.5613229    .2463118
  _Iperiod_5 |   .0984202   .2325753     0.42   0.672    -.3574189    .5542593
  _Iperiod_6 |  -.0869084   .2493746    -0.35   0.727    -.5756737    .4018569
   persparty |   1.866966   .4999945     3.73   0.000     .8869951    2.846938
       _cons |  -2.485354    .342962    -7.25   0.000    -3.157547   -1.813161
------------------------------------------------------------------------------

.                         margins,dydx($d)

Average marginal effects                                 Number of obs = 1,122
Model VCE: Robust

Expression: Predicted mean leadcontrol, predict()
dy/dx wrt:  persparty

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |   .2611123   .0732951     3.56   0.000     .1174565    .4047681
------------------------------------------------------------------------------

.                         est store org3

.                         xi:glm leadcontrol i.pregion i.period proportional mixed 
> pres ivdem ld $d if s==1,fam(bin)link(probit)cluster(cowcode)  
i.pregion         _Ipregion_1-6       (naturally coded; _Ipregion_1 omitted)
i.period          _Iperiod_1-6        (naturally coded; _Iperiod_1 omitted)
note: _Ipregion_5 != 0 predicts failure perfectly;
      _Ipregion_5 omitted and 290 obs not used.


Iteration 0:  Log pseudolikelihood = -275.38676  
Iteration 1:  Log pseudolikelihood = -266.24913  
Iteration 2:  Log pseudolikelihood = -266.20105  
Iteration 3:  Log pseudolikelihood = -266.20104  

Generalized linear models                         Number of obs   =        832
Optimization     : ML                             Residual df     =      1,106
                                                  Scale parameter =          1
Deviance         =  545.7402709                   (1/df) Deviance =    .493436
Pearson          =  916.1957882                   (1/df) Pearson  =   .8283868

Variance function: V(u) = u*(1-u/1)               [Binomial]
Link function    : g(u) = invnorm(u)              [Probit]

                                                  AIC             =   .5030322
Log pseudolikelihood =  -266.201044               BIC             =  -7221.552

                               (Std. err. adjusted for 81 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
 leadcontrol | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
 _Ipregion_2 |   .0589921   .3926028     0.15   0.881    -.7104952    .8284794
 _Ipregion_3 |  -.3553556   .3114299    -1.14   0.254    -.9657469    .2550357
 _Ipregion_4 |   .1449927   .4178797     0.35   0.729    -.6740363    .9640218
 _Ipregion_5 |          0  (omitted)
 _Ipregion_6 |   -.021293   .4322163    -0.05   0.961    -.8684213    .8258354
  _Iperiod_2 |   .2649183   .1635293     1.62   0.105    -.0555932    .5854297
  _Iperiod_3 |   .0104462   .2314525     0.05   0.964    -.4431922    .4640847
  _Iperiod_4 |  -.1573448   .2557241    -0.62   0.538    -.6585548    .3438652
  _Iperiod_5 |   .1145925   .2967223     0.39   0.699    -.4669725    .6961575
  _Iperiod_6 |   .0298857   .2934001     0.10   0.919     -.545168    .6049393
proportional |   .5436562   .4276396     1.27   0.204    -.2945021    1.381814
       mixed |   .5884462   .4580775     1.28   0.199    -.3093692    1.486262
        pres |   .0064398   .2806909     0.02   0.982    -.5437042    .5565838
       ivdem |  -1.137848   .6911359    -1.65   0.100    -2.492449     .216754
          ld |  -.1275139   .1558194    -0.82   0.413    -.4329142    .1778864
   persparty |   1.128188   .5501629     2.05   0.040     .0498882    2.206487
       _cons |  -1.400007   .7589354    -1.84   0.065    -2.887493    .0874791
------------------------------------------------------------------------------

.                         margins,dydx($d)

Average marginal effects                                   Number of obs = 832
Model VCE: Robust

Expression: Predicted mean leadcontrol, predict()
dy/dx wrt:  persparty

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |   .1969414   .0974616     2.02   0.043     .0059202    .3879625
------------------------------------------------------------------------------

.                         est store org4

.                         twoway (hist persparty,col(gs12)yscale(range(0 12)axis(2)
> )yaxis(2)bin(50) ///
>                                 ylab(0 "",axis(2)nolabels noticks) ytitle("",axis
> (2)) yscale(range(0 100)axis(2))) ///
>                                 (lpolyci leadcontrol persparty if s==1,bw(.25) yt
> itle(Leader controls party nominations) ///
>                                  yscale(alt)yscale(range(0 .2))ylab(0(0.1)0.2, ax
> is(1)) ///
>                                 xtit(Party personalism)legend(off)tit(Leader cont
> rols party nominations,size(large)) saving(h2.gph,replace) ///
>                                 yline(.0819964,lcol(blue*.5))text(.09 .1 "Leader 
> control mean",size(vsmall)))
(file h2.gph not found)
file h2.gph saved

.                                 * Footnote on populism adjustment *
.                         xi:glm leadcontrol i.pregion i.period proportional mixed 
> pres ivdem ld $d i_populism ///
>                                 if s==1,fam(bin)link(logit)cluster(cowcode)
i.pregion         _Ipregion_1-6       (naturally coded; _Ipregion_1 omitted)
i.period          _Iperiod_1-6        (naturally coded; _Iperiod_1 omitted)
note: _Ipregion_5 != 0 predicts failure perfectly;
      _Ipregion_5 omitted and 290 obs not used.


Iteration 0:  Log pseudolikelihood = -276.27587  
Iteration 1:  Log pseudolikelihood = -264.56427  
Iteration 2:  Log pseudolikelihood = -264.34939  
Iteration 3:  Log pseudolikelihood = -264.34925  
Iteration 4:  Log pseudolikelihood = -264.34925  

Generalized linear models                         Number of obs   =        832
Optimization     : ML                             Residual df     =      1,105
                                                  Scale parameter =          1
Deviance         =  544.0314413                   (1/df) Deviance =   .4923361
Pearson          =  899.2912359                   (1/df) Pearson  =   .8138382

Variance function: V(u) = u*(1-u/1)               [Binomial]
Link function    : g(u) = ln(u/(1-u))             [Logit]

                                                  AIC             =   .5015138
Log pseudolikelihood = -264.3492512               BIC             =  -7216.238

                               (Std. err. adjusted for 81 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
 leadcontrol | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
 _Ipregion_2 |   .0666198   .7125875     0.09   0.926    -1.330026    1.463266
 _Ipregion_3 |  -.9179207   .5633438    -1.63   0.103    -2.022054    .1862128
 _Ipregion_4 |   .2039518   .7458697     0.27   0.785    -1.257926    1.665829
 _Ipregion_5 |          0  (omitted)
 _Ipregion_6 |  -.1730644   .8397153    -0.21   0.837    -1.818876    1.472747
  _Iperiod_2 |   .4962573   .3229338     1.54   0.124    -.1366814    1.129196
  _Iperiod_3 |  -.0050398   .4668864    -0.01   0.991    -.9201203    .9100406
  _Iperiod_4 |  -.4504441   .5150876    -0.87   0.382    -1.459997    .5591092
  _Iperiod_5 |   .1116741   .6056166     0.18   0.854    -1.075313    1.298661
  _Iperiod_6 |  -.0742421    .588619    -0.13   0.900    -1.227914     1.07943
proportional |   1.130095    .923682     1.22   0.221    -.6802888    2.940478
       mixed |   1.219284   .9771463     1.25   0.212    -.6958872    3.134456
        pres |   .0087459   .5572015     0.02   0.987    -1.083349    1.100841
       ivdem |  -2.088555   1.267843    -1.65   0.099    -4.573482     .396373
          ld |  -.2260348   .2963307    -0.76   0.446    -.8068323    .3547628
   persparty |   2.035461   1.192704     1.71   0.088    -.3021957    4.373118
  i_populism |   .7670342   .8298454     0.92   0.355    -.8594329    2.393501
       _cons |  -2.782751   1.627523    -1.71   0.087    -5.972639    .4071358
------------------------------------------------------------------------------

.                         est store porg2

.                         margins,dydx($d i_populism)

Average marginal effects                                   Number of obs = 832
Model VCE: Robust

Expression: Predicted mean leadcontrol, predict()
dy/dx wrt:  persparty i_populism

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |   .1867331   .1080377     1.73   0.084    -.0250169    .3984831
  i_populism |   .0703677   .0794368     0.89   0.376    -.0853256    .2260609
------------------------------------------------------------------------------

. 
.                         *** Local party strength ***
.                         alpha v2palocoff v2paactcom,std item gen(localstrength)
note: option item ignored with 2 variables

Test scale = mean(standardized items)

Average interitem correlation:      0.7151
Number of items in the scale:            2
Scale reliability coefficient:      0.8339

.                         qui sum localstrength 

.                         replace localstrength= (localstrength+abs(r(min)))
(2,243 real changes made)

.                         qui sum localstrength

.                         replace localstrength=localstrength/r(max)
(2,240 real changes made)

.                         xi:glm localstrength i.period $d if s==1,fam(bin)link(pro
> bit)cluster(cowcode)                   
i.period          _Iperiod_1-6        (naturally coded; _Iperiod_1 omitted)
note: localstrength has noninteger values

Iteration 0:  Log pseudolikelihood = -517.74233  
Iteration 1:  Log pseudolikelihood = -517.73844  
Iteration 2:  Log pseudolikelihood = -517.73844  

Generalized linear models                         Number of obs   =      1,122
Optimization     : ML                             Residual df     =      1,115
                                                  Scale parameter =          1
Deviance         =  206.3331653                   (1/df) Deviance =   .1850522
Pearson          =  197.1756437                   (1/df) Pearson  =   .1768391

Variance function: V(u) = u*(1-u/1)               [Binomial]
Link function    : g(u) = invnorm(u)              [Probit]

                                                  AIC             =   .9353626
Log pseudolikelihood =  -517.738444               BIC             =  -7624.165

                               (Std. err. adjusted for 101 clusters in cowcode)
-------------------------------------------------------------------------------
              |               Robust
localstrength | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
   _Iperiod_2 |   .0389912    .041697     0.94   0.350    -.0427335    .1207158
   _Iperiod_3 |   .0726861   .0473743     1.53   0.125    -.0201659    .1655381
   _Iperiod_4 |   .0801323   .0519793     1.54   0.123    -.0217452    .1820098
   _Iperiod_5 |   .1099747   .0593051     1.85   0.064    -.0062612    .2262105
   _Iperiod_6 |   .0834943   .0721192     1.16   0.247    -.0578567    .2248453
    persparty |  -.4888733   .2108763    -2.32   0.020    -.9021832   -.0755634
        _cons |   .5815693   .1466962     3.96   0.000     .2940501    .8690885
-------------------------------------------------------------------------------

.                         margins,dydx($d)

Average marginal effects                                 Number of obs = 1,122
Model VCE: Robust

Expression: Predicted mean localstrength, predict()
dy/dx wrt:  persparty

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |  -.1792964   .0755757    -2.37   0.018     -.327422   -.0311708
------------------------------------------------------------------------------

.                         est store org5

.                         xi:glm localstrength i.pregion i.period proportional mixe
> d pres ivdem ld $d if s==1,fam(bin)link(probit)cluster(cowcod) 
i.pregion         _Ipregion_1-6       (naturally coded; _Ipregion_1 omitted)
i.period          _Iperiod_1-6        (naturally coded; _Iperiod_1 omitted)
note: localstrength has noninteger values

Iteration 0:  Log pseudolikelihood = -511.38848  
Iteration 1:  Log pseudolikelihood = -511.37454  
Iteration 2:  Log pseudolikelihood = -511.37454  

Generalized linear models                         Number of obs   =      1,122
Optimization     : ML                             Residual df     =      1,105
                                                  Scale parameter =          1
Deviance         =  193.6053518                   (1/df) Deviance =   .1752085
Pearson          =  184.9621484                   (1/df) Pearson  =   .1673866

Variance function: V(u) = u*(1-u/1)               [Binomial]
Link function    : g(u) = invnorm(u)              [Probit]

                                                  AIC             =   .9418441
Log pseudolikelihood = -511.3745373               BIC             =  -7566.664

                               (Std. err. adjusted for 101 clusters in cowcode)
-------------------------------------------------------------------------------
              |               Robust
localstrength | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
  _Ipregion_2 |  -.2948655    .169688    -1.74   0.082    -.6274479    .0377169
  _Ipregion_3 |   .0391707   .1573056     0.25   0.803    -.2691425     .347484
  _Ipregion_4 |  -.2818216    .174574    -1.61   0.106    -.6239804    .0603372
  _Ipregion_5 |  -.1031871   .1641483    -0.63   0.530    -.4249118    .2185376
  _Ipregion_6 |  -.2188098   .1709052    -1.28   0.200    -.5537778    .1161581
   _Iperiod_2 |   .0481944   .0483415     1.00   0.319    -.0465533    .1429421
   _Iperiod_3 |   .0789946   .0589672     1.34   0.180     -.036579    .1945681
   _Iperiod_4 |   .1119311   .0678756     1.65   0.099    -.0211027    .2449649
   _Iperiod_5 |   .1390874   .0782709     1.78   0.076    -.0143207    .2924956
   _Iperiod_6 |    .145046    .096224     1.51   0.132    -.0435495    .3336416
 proportional |   .0230712   .1636348     0.14   0.888    -.2976471    .3437895
        mixed |   .1033746   .1417246     0.73   0.466    -.1744005    .3811497
         pres |   .0100177    .126006     0.08   0.937    -.2369496     .256985
        ivdem |  -.0658943   .3533851    -0.19   0.852    -.7585165    .6267278
           ld |  -.0799664   .0614956    -1.30   0.193    -.2004956    .0405629
    persparty |  -.7087402   .1707764    -4.15   0.000    -1.043456   -.3740245
        _cons |    1.07403   .2956613     3.63   0.000     .4945443    1.653515
-------------------------------------------------------------------------------

.                         margins,dydx($d)

Average marginal effects                                 Number of obs = 1,122
Model VCE: Robust

Expression: Predicted mean localstrength, predict()
dy/dx wrt:  persparty

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |  -.2574751   .0602787    -4.27   0.000    -.3756192   -.1393309
------------------------------------------------------------------------------

.                         est store org6

.                         twoway (hist persparty,col(gs12)yscale(range(0 12)axis(2)
> )yaxis(2)bin(50) ///
>                                 ylab(0 "",axis(2)nolabels noticks) ytitle("",axis
> (2)) yscale(range(0 100)axis(2))) ///
>                                 (lpolyci localstrength persparty if s==1,bw(.25) 
> ytitle(Local party strength) ///
>                                  yscale(alt)yscale(range(.595 .705))ylab(.6(0.05)
> 0.7, axis(1)) ///
>                                 xtit(Party personalism)legend(off)tit(Local party
>  strength,size(large)) saving(h3.gph,replace) ///
>                                  yline(.6564862,lcol(blue*.5))  text(.654 .1 "Loc
> al strength mean",size(vsmall))  )      
(file h3.gph not found)
file h3.gph saved

.                         xi:glm localstrength i.pregion i.period proport mixed pre
> s ivdem ld $d i_populism ///
>                                 if s==1,fam(bin)link(logit)cluster(cowcod)
i.pregion         _Ipregion_1-6       (naturally coded; _Ipregion_1 omitted)
i.period          _Iperiod_1-6        (naturally coded; _Iperiod_1 omitted)
note: localstrength has noninteger values

Iteration 0:  Log pseudolikelihood = -509.69196  
Iteration 1:  Log pseudolikelihood = -509.63566  
Iteration 2:  Log pseudolikelihood = -509.63566  

Generalized linear models                         Number of obs   =      1,122
Optimization     : ML                             Residual df     =      1,104
                                                  Scale parameter =          1
Deviance         =  190.1275995                   (1/df) Deviance =    .172217
Pearson          =  182.7819311                   (1/df) Pearson  =   .1655633

Variance function: V(u) = u*(1-u/1)               [Binomial]
Link function    : g(u) = ln(u/(1-u))             [Logit]

                                                  AIC             =    .940527
Log pseudolikelihood = -509.6356611               BIC             =  -7563.119

                               (Std. err. adjusted for 101 clusters in cowcode)
-------------------------------------------------------------------------------
              |               Robust
localstrength | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
  _Ipregion_2 |  -.5352242   .2720336    -1.97   0.049      -1.0684   -.0020481
  _Ipregion_3 |   .0130916   .2512367     0.05   0.958    -.4793233    .5055064
  _Ipregion_4 |  -.4874823   .2869578    -1.70   0.089    -1.049909    .0749446
  _Ipregion_5 |  -.1401614   .2674424    -0.52   0.600    -.6643388    .3840161
  _Ipregion_6 |  -.3945112   .2765157    -1.43   0.154    -.9364721    .1474496
   _Iperiod_2 |   .0933784   .0772937     1.21   0.227    -.0581145    .2448714
   _Iperiod_3 |   .1381796   .0970059     1.42   0.154    -.0519484    .3283076
   _Iperiod_4 |   .1591493   .1111186     1.43   0.152    -.0586391    .3769378
   _Iperiod_5 |   .2139453   .1267001     1.69   0.091    -.0343823    .4622728
   _Iperiod_6 |   .2215288   .1533159     1.44   0.148    -.0789649    .5220224
 proportional |   .0550595   .2717273     0.20   0.839    -.4775163    .5876353
        mixed |   .1784285   .2374688     0.75   0.452    -.2870019    .6438589
         pres |  -.0127955   .2068986    -0.06   0.951    -.4183093    .3927183
        ivdem |  -.1327121   .5779165    -0.23   0.818    -1.265408    .9999834
           ld |  -.1283086   .1015736    -1.26   0.207    -.3273892    .0707719
    persparty |  -1.270358   .3048363    -4.17   0.000    -1.867826   -.6728895
   i_populism |   .5302751   .2653847     2.00   0.046     .0101306     1.05042
        _cons |   1.638925   .4942943     3.32   0.001     .6701257    2.607724
-------------------------------------------------------------------------------

.                                 est store porg3

.                         margins,dydx($d i_populism)

Average marginal effects                                 Number of obs = 1,122
Model VCE: Robust

Expression: Predicted mean localstrength, predict()
dy/dx wrt:  persparty i_populism

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |  -.2813193    .064586    -4.36   0.000    -.4079055   -.1547331
  i_populism |   .1174288   .0583227     2.01   0.044     .0031185    .2317392
------------------------------------------------------------------------------

.                         
.                           * Plots for figure *
.                         gr combine h2.gph h1.gph h3.gph,xsize(5) ysize(2) col(3)i
> scale(.7)

.                         gr export "$dir\golden\Ch3-Persparty-Control.pdf",as(pdf)
> replace 
file
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\golden\C
    > h3-Persparty-Control.pdf saved as PDF format

.                         
.                         *** Within estimator plot results ***
.                         gen e=.
(2,392 missing values generated)

.                         gen hi=.
(2,392 missing values generated)

.                         gen lo=.
(2,392 missing values generated)

.                         gen n =_n

.                         local i =1

.                         local var = "leadcontrol v2pafunds_6 localstrength"

.                         foreach v of local var {                
  2.                                 qui xi: reghdfe `v' ivdem ld persparty i.perio
> d if s==1,a(cowcode) cluster(lid)
  3.                                 nlcom _b[$d],post
  4.                                 mat e = e(b)
  5.                                 mat v = e(V)
  6.                                 mat list e
  7.                                 mat list v
  8.                                 local b=e[1,1] 
  9.                                 di `b'
 10.                                 local se = sqrt(v[1,1])
 11.                                 di `se'
 12.                                 replace e =`b' if n==`i'
 13.                                 replace hi = `b' + 1.96* `se' if n==`i'
 14.                                 replace lo = `b' - 1.96* `se'  if n==`i'
 15.                                 local i = `i'+1
 16.                         }

       _nl_1: _b[persparty]

------------------------------------------------------------------------------
 leadcontrol | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
       _nl_1 |    .127028   .0621777     2.04   0.041     .0051619    .2488941
------------------------------------------------------------------------------

symmetric e[1,1]
        _nl_1
y1  .12702798

symmetric v[1,1]
           _nl_1
_nl_1  .00386607
.12702798
.06217773
(1 real change made)
(1 real change made)
(1 real change made)

       _nl_1: _b[persparty]

------------------------------------------------------------------------------
 v2pafunds_6 | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
       _nl_1 |    .101834   .0441759     2.31   0.021     .0152507    .1884173
------------------------------------------------------------------------------

symmetric e[1,1]
        _nl_1
y1  .10183399

symmetric v[1,1]
           _nl_1
_nl_1  .00195151
.10183399
.04417594
(1 real change made)
(1 real change made)
(1 real change made)

       _nl_1: _b[persparty]

------------------------------------------------------------------------------
localstren~h | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
       _nl_1 |  -.1433986   .0355311    -4.04   0.000    -.2130383    -.073759
------------------------------------------------------------------------------

symmetric e[1,1]
         _nl_1
y1  -.14339865

symmetric v[1,1]
           _nl_1
_nl_1  .00126246
-.14339865
.03553107
(1 real change made)
(1 real change made)
(1 real change made)

.                         twoway (rspike hi lo n if n<=3) (scatter e n if n<=3,msym
> (O)ytit({&beta}{sub:Party Personalist})yline(0,lcol(red)) ///
>                                 xlab( 1 `""Leader nominates" "candidates""' 2 `""
> Leader" "funds party""' 3  `""Local party" "strength""') ///
>                                 xscale(range(0.8 3.2))xtit("")note(95% CI,size(vs
> mall)pos(8)ring(0))legend(off)title(Leader control over party) ///
>                                 subtitle(Within estimator,size(small)))

.                         gr export "$dir\golden\Ch3-Persparty-Control-Within.pdf",
> as(pdf)replace 
file
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\golden\C
    > h3-Persparty-Control-Within.pdf saved as PDF format

. 
.                 * Plot estimates *
.                         label  var ld  `""Democracy" "age      ""'

.                         label  var persparty  `""{bf:Party}     " "{bf:personalis
> m}""'

.                         label  var pres      `" "Presidential  " "(Parliamentary)
> ""'

.                         label  var ivdem  `""Initial   " "democracy" "level    ""
> '

.                         label  var proportional  `" "Proportional " "(Majoritaria
> n)""'

.                         label  var mixed  `" "Mixed      " "(Majoritarian)""'

.                         label var i_populism `""{bf:Party}     " "{bf:populism}""
> '

.                         coefplot (org1, msymbol(d))(org2,mfcolor(gs1)msymbol(circ
> le)) (porg1,mfcolor(gs1)msymbol(T)), order(persparty)  ///
>                                 drop(_cons _Iperiod_* _Iv2elparle_3 _Ipregion* pe
> riod* ) xline(0) msymbol(d) mfcolor(white) grid(glcolor(gs15)) ///
>                                 levels(90) legend(lab(2 "Baseline")lab(4 "Covaria
> te adjustment")lab(6 "+ populism")  order(2 4 6) ///
>                                 size(small) pos(6) col(3) ring(1)) xsize(2) ysize
> (2) xlab(-5(1)2)  ///
>                                 xtitle("        Coefficient estimate", size(small
> ))  ///
>                                 ciopts(lwidth(thin)) aspectratio(1) scale(.85)  /
> //
>                                 title(Leader funds party, size(large) height(3)) 
> ///
>                                 saving(h1.gph,replace)
file h1.gph saved

.                         coefplot (org3, msymbol(d))(org4,mfcolor(gs1) msymbol(cir
> cle)) (porg2,mfcolor(gs1)msymbol(T)), order(persparty)  ///
>                                 drop(_cons _Iperiod_* _Iv2elparle_3 _Ipregion* pe
> riod*) xline(0) msymbol(d) mfcolor(white) grid(glcolor(gs15)) ///
>                                 levels(90) legend(lab(2 "Baseline")lab(4 "Covaria
> te adjustment")lab(6 "+ populism")  order(2 4 6) ///
>                                 size(small) pos(6) col(3) ring(1)) xsize(2) ysize
> (2) xlab(-5(1)3)  ///
>                                 xtitle("        Coefficient estimate", size(small
> ))  ///
>                                 ciopts(lwidth(thin)) aspectratio(1) scale(.85)  /
> //
>                                 title(Leader controls party nominations, size(lar
> ge) height(3)) ///
>                                 saving(h2.gph,replace)
file h2.gph saved

.                         coefplot (org5, msymbol(d))(org6,mfcolor(gs1) msymbol(cir
> cle)) (porg3,mfcolor(gs1)msymbol(T)), order(persparty)  ///
>                                 drop(_cons _Iperiod_* _Iv2elparle_3 _Ipregion* pe
> riod*) xline(0) msymbol(d) mfcolor(white) grid(glcolor(gs15)) ///
>                                 levels(90) legend(lab(2 "Baseline")lab(4 "Covaria
> te adjustment")lab(6 "+ populism")  order(2 4 6) ///
>                                 size(small) pos(6) col(3) ring(1)) xsize(2) ysize
> (2) xlab(-1.6(.4)1.2)  ///
>                                 xtitle("        Coefficient estimate", size(small
> ))  ///
>                                 ciopts(lwidth(thin)) aspectratio(1) scale(.85)  /
> //
>                                 title(Local party strength, size(large) height(3)
> ) ///
>                                 saving(h3.gph,replace)
file h3.gph saved

.                         gr combine h1.gph h2.gph h3.gph,xsize(4) ysize(8) col(1)i
> scale(.95) ///
>                                  note("Geographic region and time period FEs esti
> mated but not reported." "Cluster-robust standard errors used to calculate confid
> ence intervals.",size(small)pos(6))  

.                         gr export "$dir\golden\T-Persparty-Party-Control-Estimate
> s.pdf",as(pdf)replace 
file
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\golden\T
    > -Persparty-Party-Control-Estimates.pdf saved as PDF format

.                 
.         
.  **********************************************************************
.  *** Elites experience using the Global Leadership Project data set ***
.  ********************************************************************** 
.                         use "$dir\pers-use.dta",clear

.                         sort cowcode year,

.                         save, replace
file
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\pers-use
    > .dta saved

.                         clear all

.                         use "$dir\GLP-person-18-07-29.dta"

.                         drop if person_office_start_year==0
(3,253 observations deleted)

.                         drop if person_office_start_year>2013
(2 observations deleted)

.                         drop if person_office_start_year<1955
(1 observation deleted)

. 
.                         gen cowcode =.
(34,829 missing values generated)

.                         qui do cowcodes

.                         replace cowcode=437 if country=="Cote d'Ivoire (Ivory Coa
> st)"
(273 real changes made)

.                         replace cowcode=732 if country=="Korea, South"
(346 real changes made)

.                         replace cowcode=359 if country=="Moldova, Republic of"
(127 real changes made)

.                         replace cowcode=347 if country=="Kosovo"
(107 real changes made)

.                         replace cowcode=200 if country=="United Kingdom (Great Br
> itain)"
(662 real changes made)

.                         tab country if cowcode==.

                       Country name |      Freq.     Percent        Cum.
------------------------------------+-----------------------------------
        China, People's Republic of |      3,039       71.29       71.29
  Congo, Democratic Republic of the |        548       12.85       84.14
Cyprus, Northern (Turkish Republic) |         61        1.43       85.57
                         Montenegro |        100        2.35       87.92
    Palestinian Territory, Occupied |        134        3.14       91.06
                       Sudan, South |        301        7.06       98.12
           Timor-Leste (East Timor) |         80        1.88      100.00
------------------------------------+-----------------------------------
                              Total |      4,263      100.00

.                         drop if cowcode==.
(4,263 observations deleted)

.                         gen year=2013

.                         sort cowcode year

.                         merge cowcode year using "$dir\pers-use.dta"
(you are using old merge syntax; see [D] merge for new syntax)
variables cowcode year do not uniquely identify observations in the master data
(variable country was str35, now str45 to accommodate using data's values)
(variable year was float, now double to accommodate using data's values)
(variable cowcode was float, now double to accommodate using data's values)

.                         drop if year~=2013
(2,306 observations deleted)

.                         tab _merge

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |     10,571       34.58       34.58
          2 |          4        0.01       34.59
          3 |     19,995       65.41      100.00
------------+-----------------------------------
      Total |     30,570      100.00

.                         keep if _merge==3
(10,575 observations deleted)

.                         drop _merge

.                         /*  
>                         Missing countries in GLP:
>                         cowcode country
>                         475     Nigeria
>                         713     Taiwan
>                         771     Bangladesh
>                         790     Nepal
>                         */
. 
.                         * Variables *
.                         gen exp_missing = polexp==.

.                         gen exp_party=polexp==8

.                         xtile xage = age, nq(8)

.                         recode xage (.=0)
(3,213 changes made to xage)

.                         gen tenure = year-person_office_start_year 

.                         gen tt = ln(1+(tenure))

.                         gen tx= tenure 

.                         replace tx = 25 if tenure>25 & tenure~=.
(155 real changes made)

.                         qui sum populism 

.                         qui replace populism = (populism +abs(r(min)))/(r(max)+ab
> s(r(min)))

. 
.                         * Sample: non-backbenchers *
.                         *gen s = 1
.                         gen s = office1~=6 & polexp~=. & persparty~=. & exp_party
> ~=.

.                         recode s (0=1) if power==1 | power==3  /* include most po
> werful even if backbenchers */
(180 changes made to s)

.                         recode s (1=0) if office1==1 /* exclude executives, who a
> re the leaders */
(96 changes made to s)

.                         hist tenure if s==1
(bin=34, start=0, width=1.2941176)

.                         tab exp_party if s==1

  exp_party |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      1,726       57.65       57.65
          1 |      1,268       42.35      100.00
------------+-----------------------------------
      Total |      2,994      100.00

.                         egen num = count(year) if s==1,by(cowcode)
(17,001 missing values generated)

.                         hist num
(bin=34, start=4, width=7)

. 
.                         * Regional distribution in sample *
.                         label def region 1 "Eastern Europe and Central Asia" 2 "L
> atin America and the Caribbean"  ///
>                                 3 "Middle East and North Africa" 4 "Sub-Saharan A
> frica" ///
>                                 5 "Western Europe and North America" 6 "Asia and 
> Pacific" ,replace

.                         label val pregion region

.                         egen c = count(ld) if s==1,by(country)
(17,001 missing values generated)

.                         egen t = tag(country) if c~=. & s==1

.                         table pregion if t==1, stat(mean c)  

----------------------------------------------
                                   |      Mean
-----------------------------------+----------
pregion                            |          
  Eastern Europe and Central Asia  |  30.15789
  Latin America and the Caribbean  |  29.70588
  Middle East and North Africa     |      36.6
  Sub-Saharan Africa               |  33.92857
  Western Europe and North America |  32.15789
  Asia and Pacific                 |  92.42857
  Total                            |  36.96296
----------------------------------------------

.                         egen r = count(ld) if s==1 & t==1,by(pregion) 
(19,914 missing values generated)

.                         table pregion if s==1, stat(mean r)  

----------------------------------------------
                                   |      Mean
-----------------------------------+----------
pregion                            |          
  Eastern Europe and Central Asia  |        19
  Latin America and the Caribbean  |        17
  Middle East and North Africa     |         5
  Sub-Saharan Africa               |        14
  Western Europe and North America |        19
  Asia and Pacific                 |         7
  Total                            |  15.81481
----------------------------------------------

.                         drop c t r

. 
.                          * Partial plots *
.                         qui reg exp_party num ld ivdem i.region if s==1

.                         predict yexper if e(sample)==1,res
(17,001 missing values generated)

.                         qui reg tx num ld ivdem i.region  if s==1

.                         predict ytenure if e(sample)==1,res
(17,001 missing values generated)

.                         qui reg persparty num ld ivdem i.region  if s==1

.                         predict xpersparty if e(sample)==1,res
(17,001 missing values generated)

.                           
.                         qui sum exp_part if s==1

.                         replace yexper=yexper+r(mean)
(2,994 real changes made)

.                         qui sum  tx if s==1

.                         replace ytenure = r(mean) + ytenure
(2,994 real changes made)

.                         qui sum persparty if s==1

.                         replace xpersparty = xpersparty+r(mean)
(2,994 real changes made)

.                         replace xpersparty = (xpersparty -.1335)/.7155
(2,994 real changes made)

.                         sum yexper ytenure if s==1

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
      yexper |      2,994    .4235137    .4685496  -.2605855   1.307218
     ytenure |      2,994    4.828323    3.566548   .0447659   25.30513

.                         sum xpersparty persparty if s==1

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
  xpersparty |      2,994    .4496497    .2141335  -.0020277   1.001166
   persparty |      2,994    .4552243    .2210963          0          1

.                          
.                         twoway (lpolyci yexper xpersparty,bw(.15) xlab(0(.2)1) yl
> ine(0.42)ytit("Probability selected from party (partial)") ///
>                                 xtit("Party personalism (partial)")legend(off)tit
> (Elite with party experience)saving(h1.gph,replace) ///
>                                 text(.43 .7 "Average level",size(vsmall)))
file h1.gph saved

.                         twoway (lpolyci ytenure xpersparty,bw(.15) xlab(0(.2)1)yl
> ine(4.82)ytit("Years of experience (partial)") ///
>                                 xtit("Party personalism (partial)")legend(off)tit
> (Elite years of experience)saving(h2.gph,replace) ///
>                                 text(4.85 .7 "Average level",size(vsmall))ylab(4(
> 1)6))
file h2.gph saved

.                         gr combine h1.gph h2.gph,xsize(8)iscale(.8) ///
>                                 tit(Personalist parties have fewer elites from th
> e party and elites with less experience)

.                         gr export "$dir\golden\Ch3-GLP-Elite-Experience.pdf",as(p
> df)replace 
file
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\golden\C
    > h3-GLP-Elite-Experience.pdf saved as PDF format

.                         erase h1.gph 

.                         erase h2.gph

.                         drop yexper ytenure xpersparty

. 
.                         ********************
.                         * Party experience *
.                         ********************
.                         replace num = num/100
(2,994 real changes made)

.                         xi:logit exp_party num persparty ld if s==1, cluster(cowc
> ode)

Iteration 0:  Log pseudolikelihood =  -2040.114  
Iteration 1:  Log pseudolikelihood = -1915.2123  
Iteration 2:  Log pseudolikelihood =  -1911.425  
Iteration 3:  Log pseudolikelihood = -1911.4174  
Iteration 4:  Log pseudolikelihood = -1911.4174  

Logistic regression                                     Number of obs =  2,994
                                                        Wald chi2(3)  =  23.28
                                                        Prob > chi2   = 0.0000
Log pseudolikelihood = -1911.4174                       Pseudo R2     = 0.0631

                               (Std. err. adjusted for 81 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
   exp_party | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         num |  -1.408117   .2943617    -4.78   0.000    -1.985055   -.8311783
   persparty |  -1.744343   .7766111    -2.25   0.025    -3.266473   -.2222134
          ld |  -.0788307   .1641773    -0.48   0.631    -.4006122    .2429508
       _cons |   1.588666   .8761171     1.81   0.070    -.1284916    3.305824
------------------------------------------------------------------------------

.                         est store party0

.                         xi:logit exp_party num persparty ld ivdem if s==1, cluste
> r(cowcode) 

Iteration 0:  Log pseudolikelihood =  -2040.114  
Iteration 1:  Log pseudolikelihood = -1911.1559  
Iteration 2:  Log pseudolikelihood = -1907.6289  
Iteration 3:  Log pseudolikelihood =  -1907.619  
Iteration 4:  Log pseudolikelihood =  -1907.619  

Logistic regression                                     Number of obs =  2,994
                                                        Wald chi2(4)  =  24.41
                                                        Prob > chi2   = 0.0001
Log pseudolikelihood = -1907.619                        Pseudo R2     = 0.0649

                               (Std. err. adjusted for 81 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
   exp_party | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         num |  -1.370625   .2868604    -4.78   0.000    -1.932861   -.8083895
   persparty |  -1.709004   .7820745    -2.19   0.029    -3.241842   -.1761664
          ld |  -.1969546   .2271764    -0.87   0.386    -.6422121    .2483028
       ivdem |   1.017564   1.435797     0.71   0.479    -1.796547    3.831674
       _cons |   1.202174   1.073751     1.12   0.263    -.9023392    3.306686
------------------------------------------------------------------------------

.                         est store party1

.                         xi:logit exp_party num persparty ld ivdem pres if s==1, c
> luster(cowcode) 

Iteration 0:  Log pseudolikelihood =  -2040.114  
Iteration 1:  Log pseudolikelihood = -1905.4629  
Iteration 2:  Log pseudolikelihood = -1901.9887  
Iteration 3:  Log pseudolikelihood = -1901.9781  
Iteration 4:  Log pseudolikelihood = -1901.9781  

Logistic regression                                     Number of obs =  2,994
                                                        Wald chi2(5)  =  22.82
                                                        Prob > chi2   = 0.0004
Log pseudolikelihood = -1901.9781                       Pseudo R2     = 0.0677

                               (Std. err. adjusted for 81 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
   exp_party | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         num |  -1.410287   .3064736    -4.60   0.000    -2.010964   -.8096096
   persparty |   -1.70576   .7928082    -2.15   0.031    -3.259635   -.1518844
          ld |  -.2229315   .2336256    -0.95   0.340    -.6808293    .2349662
       ivdem |   .9072172   1.427967     0.64   0.525    -1.891547    3.705982
        pres |  -.2757388   .3128218    -0.88   0.378    -.8888582    .3373807
       _cons |    1.51906   1.085038     1.40   0.162    -.6075764    3.645696
------------------------------------------------------------------------------

.                         est store party2

.                         xi:logit exp_party num persparty ld ivdem lpop l1gdp if s
> ==1, cluster(cowcode)

Iteration 0:  Log pseudolikelihood = -1972.8414  
Iteration 1:  Log pseudolikelihood = -1829.0183  
Iteration 2:  Log pseudolikelihood = -1826.0997  
Iteration 3:  Log pseudolikelihood = -1826.0838  
Iteration 4:  Log pseudolikelihood = -1826.0838  

Logistic regression                                     Number of obs =  2,910
                                                        Wald chi2(6)  =  26.49
                                                        Prob > chi2   = 0.0002
Log pseudolikelihood = -1826.0838                       Pseudo R2     = 0.0744

                               (Std. err. adjusted for 79 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
   exp_party | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         num |  -1.321142   .2996912    -4.41   0.000    -1.908526   -.7337576
   persparty |  -1.543421   .8650662    -1.78   0.074    -3.238919    .1520778
          ld |  -.3526141   .2713262    -1.30   0.194    -.8844038    .1791755
       ivdem |   .4885614   1.403361     0.35   0.728    -2.261976    3.239099
        lpop |  -.0109852   .1066149    -0.10   0.918    -.2199466    .1979762
       l1gdp |   .0053234    .003744     1.42   0.155    -.0020147    .0126615
       _cons |   1.556323   2.253379     0.69   0.490    -2.860219    5.972864
------------------------------------------------------------------------------

.                         est store party3

.                         xi:logit exp_party num persparty ld ivdem i.xage male edu
> level i.power i.office1 if s==1, cluster(cowcode)
i.xage            _Ixage_0-8          (naturally coded; _Ixage_0 omitted)
i.power           _Ipower_1-3         (naturally coded; _Ipower_1 omitted)
i.office1         _Ioffice1_1-8       (naturally coded; _Ioffice1_1 omitted)

note: _Ioffice1_8 omitted because of collinearity.
Iteration 0:  Log pseudolikelihood = -2036.7433  
Iteration 1:  Log pseudolikelihood = -1834.7074  
Iteration 2:  Log pseudolikelihood = -1830.3007  
Iteration 3:  Log pseudolikelihood = -1830.2916  
Iteration 4:  Log pseudolikelihood = -1830.2916  

Logistic regression                                     Number of obs =  2,989
                                                        Wald chi2(22) =  83.19
                                                        Prob > chi2   = 0.0000
Log pseudolikelihood = -1830.2916                       Pseudo R2     = 0.1014

                               (Std. err. adjusted for 81 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
   exp_party | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         num |  -1.587045   .2931762    -5.41   0.000    -2.161659    -1.01243
   persparty |   -2.06096    .806466    -2.56   0.011    -3.641604   -.4803155
          ld |  -.2632563   .2415113    -1.09   0.276    -.7366097    .2100972
       ivdem |   .9499971   1.472209     0.65   0.519     -1.93548    3.835474
    _Ixage_1 |   .7287076   .3115343     2.34   0.019     .1181116    1.339303
    _Ixage_2 |   .7249588   .2786038     2.60   0.009     .1789054    1.271012
    _Ixage_3 |   .3110694   .2809019     1.11   0.268    -.2394882    .8616271
    _Ixage_4 |   .1776276   .2711953     0.65   0.512    -.3539053    .7091606
    _Ixage_5 |   .3030642    .287975     1.05   0.293    -.2613565    .8674849
    _Ixage_6 |   .0711571   .2411655     0.30   0.768    -.4015187    .5438329
    _Ixage_7 |   .1522347   .2375387     0.64   0.522    -.3133325     .617802
    _Ixage_8 |   .0985374   .2719692     0.36   0.717    -.4345124    .6315871
        male |   .1305299   .1122607     1.16   0.245    -.0894971    .3505569
    edulevel |   .0402293   .0445299     0.90   0.366    -.0470477    .1275062
   _Ipower_2 |   .5039569   .3406952     1.48   0.139    -.1637934    1.171707
   _Ipower_3 |   .4191625   .3306194     1.27   0.205    -.2288397    1.067165
 _Ioffice1_2 |  -.4056149   .7492972    -0.54   0.588     -1.87421    1.062981
 _Ioffice1_3 |   .2728297     .65921     0.41   0.679    -1.019198    1.564857
 _Ioffice1_4 |   .5781192    .774107     0.75   0.455    -.9391026    2.095341
 _Ioffice1_5 |  -.0514746   .7423976    -0.07   0.945    -1.506547    1.403598
 _Ioffice1_6 |   .0444322   .7500066     0.06   0.953    -1.425554    1.514418
 _Ioffice1_7 |  -1.119492   .8176072    -1.37   0.171    -2.721973    .4829885
 _Ioffice1_8 |          0  (omitted)
       _cons |   .9008096   1.317352     0.68   0.494    -1.681152    3.482771
------------------------------------------------------------------------------

.                         est store party4

.                         xi:logit exp_party num persparty ld ivdem i_populism if s
> ==1, cluster(cowcode)

Iteration 0:  Log pseudolikelihood = -2028.3475  
Iteration 1:  Log pseudolikelihood = -1898.0898  
Iteration 2:  Log pseudolikelihood = -1894.0818  
Iteration 3:  Log pseudolikelihood = -1894.0704  
Iteration 4:  Log pseudolikelihood = -1894.0704  

Logistic regression                                     Number of obs =  2,976
                                                        Wald chi2(5)  =  24.58
                                                        Prob > chi2   = 0.0002
Log pseudolikelihood = -1894.0704                       Pseudo R2     = 0.0662

                               (Std. err. adjusted for 79 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
   exp_party | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         num |  -1.373209   .2868987    -4.79   0.000     -1.93552   -.8108982
   persparty |  -1.714891   .7938951    -2.16   0.031    -3.270897   -.1588851
          ld |  -.1742256   .2304457    -0.76   0.450    -.6258909    .2774397
       ivdem |   1.118297   1.439912     0.78   0.437     -1.70388    3.940473
  i_populism |    .272095   .5725745     0.48   0.635    -.8501304     1.39432
       _cons |   .9391115   1.162678     0.81   0.419    -1.339696    3.217919
------------------------------------------------------------------------------

.                         est store party5

.                         xi:logit exp_party num persparty ld ivdem i.region if s==
> 1, cluster(cowcode)
i.region          _Iregion_1-5        (naturally coded; _Iregion_1 omitted)

Iteration 0:  Log pseudolikelihood =  -2040.114  
Iteration 1:  Log pseudolikelihood = -1861.4963  
Iteration 2:  Log pseudolikelihood = -1858.7702  
Iteration 3:  Log pseudolikelihood = -1858.7596  
Iteration 4:  Log pseudolikelihood = -1858.7596  

Logistic regression                                     Number of obs =  2,994
                                                        Wald chi2(8)  =  28.64
                                                        Prob > chi2   = 0.0004
Log pseudolikelihood = -1858.7596                       Pseudo R2     = 0.0889

                               (Std. err. adjusted for 81 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
   exp_party | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         num |  -.9651018   .3575043    -2.70   0.007    -1.665797   -.2644062
   persparty |  -1.669005   .7974029    -2.09   0.036    -3.231886   -.1061237
          ld |  -.3498512    .239052    -1.46   0.143    -.8183845     .118682
       ivdem |   .4101392   1.463904     0.28   0.779    -2.459061    3.279339
  _Iregion_2 |   .5722479   .4589623     1.25   0.212    -.3273017    1.471798
  _Iregion_3 |   .4250587   .5596251     0.76   0.448    -.6717863    1.521904
  _Iregion_4 |   1.280611   .4976696     2.57   0.010     .3051965    2.256026
  _Iregion_5 |   .3114498    .539191     0.58   0.564    -.7453452    1.368245
       _cons |   1.246713   1.034756     1.20   0.228     -.781372    3.274799
------------------------------------------------------------------------------

.                         est store party6

.                         margins,dydx(persparty)  /* reported margins */

Average marginal effects                                 Number of obs = 2,994
Model VCE: Robust

Expression: Pr(exp_party), predict()
dy/dx wrt:  persparty

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |  -.3610366   .1682466    -2.15   0.032    -.6907939   -.0312793
------------------------------------------------------------------------------

.                         
.                         label var persparty `""Ruling party" "{bf:personalism}""'

.                         label var ld "Democracy age"

.                         label var ivdem `""Initial     " "democracy""'

.                         label var lpop "Population"

.                         label var l1gdp "GDP pc"

.                         label var i_populism `""Ruling party" "populism   ""'

.                         label var num `""# of elite " "in country""'

.                         label var pres `""Presidential" "system""'

.                         coefplot(party0, msymbol(O)mcol(gs1))(party1, msymbol(T)m
> col(gs1))(party2, msymbol(S)mcol(gs1)) ///
>                                 (party3, msymbol(D)mcol(gs1)) ///
>                                 (party4, msymbol(O)mcol(gs11))(party5, msymbol(T)
> mcol(gs11))(party6, msymbol(S)mcol(gs11)), ///
>                                 drop(_cons male edulevel  _I* pres lpop l1gdp) //
> /
>                                 grid(glcolor(gs15))xline(0,lpattern(dash)) ///
>                                 xtitle(Coefficient estimates) order(persparty ld 
> ivdem i_populism)level(95 90) ///
>                                 title("Elites with Party experience", ///
>                                 size(medium)height(6)) legend(lab(3 "Baseline") l
> ab(6 "+ Initial democracy") lab(9 "+ Presidential system") ///
>                                 lab(12 "+ GDP, Population") lab(15 "+ Elite covar
> iates")lab(18 "+ Populism") lab(21 "+ Region FE")  ///
>                                 pos(6)ring(1)col(2)) xsize(2) ysize(3.5) mlabel f
> ormat(%9.2g) ///
>                                 mlabsize(vsmall)mlabposition(2)mlabgap(*.65)

.                         gr export "$dir\golden\T-GLP-party-experience.pdf",as(pdf
> )replace 
file
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\golden\T
    > -GLP-party-experience.pdf saved as PDF format

. 
.                         * Margins when adjusting for party populism *
.                         qui logit exp_party num persparty ld ivdem i.region i_pop
> ulism  if s==1, cluster(cowcode)

.                         margins,dydx(persparty)

Average marginal effects                                 Number of obs = 2,976
Model VCE: Robust

Expression: Pr(exp_party), predict()
dy/dx wrt:  persparty

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |  -.3594534   .1589366    -2.26   0.024    -.6709633   -.0479434
------------------------------------------------------------------------------

.                         margins,dydx(i_populism)

Average marginal effects                                 Number of obs = 2,976
Model VCE: Robust

Expression: Pr(exp_party), predict()
dy/dx wrt:  i_populism

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
  i_populism |   .1622084   .1482025     1.09   0.274    -.1282631      .45268
------------------------------------------------------------------------------

. 
.                         gen noexp = polexp==1 if polexp~=.
(4,834 missing values generated)

.                         xi:logit noexp num persparty ld if s==1, cluster(cowcode)

Iteration 0:  Log pseudolikelihood = -1045.3539  
Iteration 1:  Log pseudolikelihood = -945.65924  
Iteration 2:  Log pseudolikelihood = -887.39256  
Iteration 3:  Log pseudolikelihood = -871.38714  
Iteration 4:  Log pseudolikelihood = -871.34882  
Iteration 5:  Log pseudolikelihood = -871.34882  

Logistic regression                                     Number of obs =  2,911
                                                        Wald chi2(3)  = 227.48
                                                        Prob > chi2   = 0.0000
Log pseudolikelihood = -871.34882                       Pseudo R2     = 0.1665

                               (Std. err. adjusted for 81 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
       noexp | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         num |   1.589321   .1777189     8.94   0.000     1.240998    1.937644
   persparty |   2.553583   1.090529     2.34   0.019     .4161865     4.69098
          ld |   .3895939   .2554937     1.52   0.127    -.1111644    .8903523
       _cons |  -5.847446   1.384954    -4.22   0.000    -8.561906   -3.132987
------------------------------------------------------------------------------

.                         est store no0

.                         xi:logit noexp num persparty ld ivdem if s==1, cluster(co
> wcode) 

Iteration 0:  Log pseudolikelihood = -1045.3539  
Iteration 1:  Log pseudolikelihood = -944.11193  
Iteration 2:  Log pseudolikelihood = -884.90953  
Iteration 3:  Log pseudolikelihood = -868.66241  
Iteration 4:  Log pseudolikelihood = -868.61705  
Iteration 5:  Log pseudolikelihood = -868.61705  

Logistic regression                                     Number of obs =  2,911
                                                        Wald chi2(4)  = 217.42
                                                        Prob > chi2   = 0.0000
Log pseudolikelihood = -868.61705                       Pseudo R2     = 0.1691

                               (Std. err. adjusted for 81 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
       noexp | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         num |   1.595509   .1777794     8.97   0.000     1.247067     1.94395
   persparty |   2.537251   1.052628     2.41   0.016     .4741377    4.600364
          ld |   .5917936   .3681806     1.61   0.108    -.1298271    1.313414
       ivdem |  -1.702224   2.633918    -0.65   0.518    -6.864609    3.460161
       _cons |  -5.295279   1.672134    -3.17   0.002    -8.572602   -2.017957
------------------------------------------------------------------------------

.                         est store no1

.                         xi:logit noexp num persparty ld ivdem pres if s==1, clust
> er(cowcode) 

Iteration 0:  Log pseudolikelihood = -1045.3539  
Iteration 1:  Log pseudolikelihood = -930.32975  
Iteration 2:  Log pseudolikelihood = -866.25066  
Iteration 3:  Log pseudolikelihood = -850.79001  
Iteration 4:  Log pseudolikelihood = -850.75039  
Iteration 5:  Log pseudolikelihood = -850.75039  

Logistic regression                                     Number of obs =  2,911
                                                        Wald chi2(5)  = 256.97
                                                        Prob > chi2   = 0.0000
Log pseudolikelihood = -850.75039                       Pseudo R2     = 0.1862

                               (Std. err. adjusted for 81 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
       noexp | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         num |     1.8061    .218484     8.27   0.000     1.377879    2.234321
   persparty |   2.610989   1.087732     2.40   0.016     .4790743    4.742903
          ld |   .7959444   .3204284     2.48   0.013     .1679162    1.423973
       ivdem |   -1.69724   2.200262    -0.77   0.440    -6.009674    2.615194
        pres |   .9766274   .4143761     2.36   0.018     .1644651     1.78879
       _cons |  -6.688529   1.471231    -4.55   0.000    -9.572089    -3.80497
------------------------------------------------------------------------------

.                         est store no2

.                         xi:logit noexp num persparty ld ivdem lpop l1gdp if s==1,
>  cluster(cowcode)

Iteration 0:  Log pseudolikelihood = -1032.8255  
Iteration 1:  Log pseudolikelihood =  -931.1031  
Iteration 2:  Log pseudolikelihood = -873.94273  
Iteration 3:  Log pseudolikelihood =  -856.1424  
Iteration 4:  Log pseudolikelihood = -856.08436  
Iteration 5:  Log pseudolikelihood = -856.08436  

Logistic regression                                     Number of obs =  2,827
                                                        Wald chi2(6)  = 220.46
                                                        Prob > chi2   = 0.0000
Log pseudolikelihood = -856.08436                       Pseudo R2     = 0.1711

                               (Std. err. adjusted for 79 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
       noexp | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         num |   1.615109     .24465     6.60   0.000     1.135604    2.094615
   persparty |   2.273145   1.084065     2.10   0.036     .1484174    4.397873
          ld |   .5164124   .3694743     1.40   0.162    -.2077439    1.240569
       ivdem |   -2.60019   2.825219    -0.92   0.357    -8.137517    2.937137
        lpop |  -.0828877   .1393055    -0.60   0.552    -.3559214     .190146
       l1gdp |   .0027288   .0047786     0.57   0.568    -.0066371    .0120948
       _cons |  -3.146594   2.954729    -1.06   0.287    -8.937757    2.644569
------------------------------------------------------------------------------

.                         est store no3

.                         xi:logit noexp num persparty ld ivdem i.xage male eduleve
> l i.power i.office1 if s==1, cluster(cowcode)
i.xage            _Ixage_0-8          (naturally coded; _Ixage_0 omitted)
i.power           _Ipower_1-3         (naturally coded; _Ipower_1 omitted)
i.office1         _Ioffice1_1-8       (naturally coded; _Ioffice1_1 omitted)

note: _Ioffice1_8 omitted because of collinearity.
Iteration 0:  Log pseudolikelihood = -1044.7362  
Iteration 1:  Log pseudolikelihood = -863.12464  
Iteration 2:  Log pseudolikelihood = -764.37136  
Iteration 3:  Log pseudolikelihood =  -754.3702  
Iteration 4:  Log pseudolikelihood = -754.29171  
Iteration 5:  Log pseudolikelihood = -754.29166  

Logistic regression                                     Number of obs =  2,906
                                                        Wald chi2(22) = 601.07
                                                        Prob > chi2   = 0.0000
Log pseudolikelihood = -754.29166                       Pseudo R2     = 0.2780

                               (Std. err. adjusted for 81 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
       noexp | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         num |   2.332284   .1964444    11.87   0.000      1.94726    2.717308
   persparty |   3.442302   1.152902     2.99   0.003     1.182656    5.701949
          ld |   .7805979   .3505069     2.23   0.026      .093617    1.467579
       ivdem |  -1.357163   2.265675    -0.60   0.549    -5.797804    3.083478
    _Ixage_1 |  -.2323746   .3337213    -0.70   0.486    -.8864563    .4217071
    _Ixage_2 |  -.1894505   .4170015    -0.45   0.650    -1.006758    .6278574
    _Ixage_3 |   .0038993   .3629341     0.01   0.991    -.7074386    .7152371
    _Ixage_4 |  -.3030898    .339722    -0.89   0.372    -.9689326    .3627531
    _Ixage_5 |   -1.02254   .4165361    -2.45   0.014    -1.838935    -.206144
    _Ixage_6 |  -.1382642   .3517199    -0.39   0.694    -.8276225    .5510941
    _Ixage_7 |  -.8169255   .3320942    -2.46   0.014    -1.467818   -.1660328
    _Ixage_8 |  -.8401038   .3610731    -2.33   0.020    -1.547794   -.1324134
        male |  -.3693147   .2089414    -1.77   0.077    -.7788323    .0402029
    edulevel |   .1583104   .0971349     1.63   0.103    -.0320704    .3486912
   _Ipower_2 |   .0583969   .6090371     0.10   0.924    -1.135294    1.252088
   _Ipower_3 |  -.7298158   .6723302    -1.09   0.278    -2.047559    .5879272
 _Ioffice1_2 |  -.8351722    .906828    -0.92   0.357    -2.612522    .9421779
 _Ioffice1_3 |  -.7916011   .7796558    -1.02   0.310    -2.319698    .7364963
 _Ioffice1_4 |  -2.083293    .957853    -2.17   0.030    -3.960651    -.205936
 _Ioffice1_5 |  -1.714231   .9262223    -1.85   0.064    -3.529594     .101131
 _Ioffice1_6 |  -.0316395   1.074459    -0.03   0.977     -2.13754    2.074261
 _Ioffice1_7 |   1.374353   1.004183     1.37   0.171    -.5938086    3.342515
 _Ioffice1_8 |          0  (omitted)
       _cons |  -6.275516   2.350639    -2.67   0.008    -10.88268   -1.668348
------------------------------------------------------------------------------

.                         est store no4

.                         xi:logit noexp num persparty ld ivdem i_populism if s==1,
>  cluster(cowcode)

Iteration 0:  Log pseudolikelihood = -1043.8696  
Iteration 1:  Log pseudolikelihood = -943.80964  
Iteration 2:  Log pseudolikelihood = -886.19271  
Iteration 3:  Log pseudolikelihood = -866.05335  
Iteration 4:  Log pseudolikelihood = -865.95988  
Iteration 5:  Log pseudolikelihood = -865.95988  

Logistic regression                                     Number of obs =  2,899
                                                        Wald chi2(5)  = 236.45
                                                        Prob > chi2   = 0.0000
Log pseudolikelihood = -865.95988                       Pseudo R2     = 0.1704

                               (Std. err. adjusted for 79 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
       noexp | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         num |   1.539823   .2292069     6.72   0.000     1.090586    1.989061
   persparty |   2.635558   1.061596     2.48   0.013     .5548679    4.716249
          ld |   .5812348     .36868     1.58   0.115    -.1413647    1.303834
       ivdem |  -1.986262   2.331601    -0.85   0.394    -6.556115    2.583591
  i_populism |  -.4938504   .9683139    -0.51   0.610    -2.391711     1.40401
       _cons |  -4.848078   1.756855    -2.76   0.006    -8.291451   -1.404704
------------------------------------------------------------------------------

.                         est store no5

.                         xi:logit noexp num persparty ld ivdem i.region if s==1, c
> luster(cowcode)
i.region          _Iregion_1-5        (naturally coded; _Iregion_1 omitted)

Iteration 0:  Log pseudolikelihood = -1045.3539  
Iteration 1:  Log pseudolikelihood = -928.21149  
Iteration 2:  Log pseudolikelihood = -868.53017  
Iteration 3:  Log pseudolikelihood = -845.52643  
Iteration 4:  Log pseudolikelihood = -845.39476  
Iteration 5:  Log pseudolikelihood = -845.39476  

Logistic regression                                     Number of obs =  2,911
                                                        Wald chi2(8)  = 364.40
                                                        Prob > chi2   = 0.0000
Log pseudolikelihood = -845.39476                       Pseudo R2     = 0.1913

                               (Std. err. adjusted for 81 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
       noexp | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         num |   1.622536   .3539099     4.58   0.000     .9288848    2.316186
   persparty |   2.369167   .9987376     2.37   0.018     .4116774    4.326657
          ld |   .6413872    .355217     1.81   0.071    -.0548254      1.3376
       ivdem |  -1.903961   2.034789    -0.94   0.349    -5.892074    2.084152
  _Iregion_2 |   .6976306   .5847104     1.19   0.233    -.4483807    1.843642
  _Iregion_3 |  -.1338045   .7218877    -0.19   0.853    -1.548678    1.281069
  _Iregion_4 |  -.6335904    .629363    -1.01   0.314    -1.867119    .5999384
  _Iregion_5 |  -.7901713    .576849    -1.37   0.171    -1.920774    .3404319
       _cons |  -5.196645   1.474977    -3.52   0.000    -8.087547   -2.305743
------------------------------------------------------------------------------

.                         est store no6

.                         margins,dydx(persparty) /* reported margins */

Average marginal effects                                 Number of obs = 2,911
Model VCE: Robust

Expression: Pr(noexp), predict()
dy/dx wrt:  persparty

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |   .1974486   .0749851     2.63   0.008     .0504805    .3444168
------------------------------------------------------------------------------

.                         
.  
.                         coefplot(no0, msymbol(O)mcol(gs1))(no1, msymbol(T)mcol(gs
> 1))(no2, msymbol(S)mcol(gs1)) (no3, msymbol(D)mcol(gs1)) ///
>                                 (no4, msymbol(O)mcol(gs11))(no5, msymbol(T)mcol(g
> s11))(no6, msymbol(S)mcol(gs11)), ///
>                                 drop(_cons male edulevel  _I* pres lpop l1gdp) //
> /
>                                 grid(glcolor(gs15))xline(0,lpattern(dash)) ///
>                                 xtitle(Coefficient estimates) order(persparty ld 
> ivdem i_populism)level(95 90) ///
>                                 title("Elites with No political experience", ///
>                                 size(medium)height(6)) legend(lab(3 "Baseline") l
> ab(6 "+ Initial democracy") lab(9 "+ Presidential system") ///
>                                 lab(12 "+ GDP, Population") lab(15 "+ Elite covar
> iates")lab(18 "+ Populism") lab(21 "+ Region FE")  ///
>                                 pos(6)ring(1)col(2)) xsize(2) ysize(3.5) mlabel f
> ormat(%9.2g) ///
>                                 mlabsize(vsmall)mlabposition(2)mlabgap(*.65)

.                         gr export "$dir\golden\T-GLP-no-experience.pdf",as(pdf)re
> place 
file
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\golden\T
    > -GLP-no-experience.pdf saved as PDF format

. 
.                         * Margins when adjusting for party populism *
.                         qui logit noexp num persparty ld ivdem i.region i_populis
> m  if s==1, cluster(cowcode)

.                         margins,dydx(persparty)

Average marginal effects                                 Number of obs = 2,899
Model VCE: Robust

Expression: Pr(noexp), predict()
dy/dx wrt:  persparty

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |   .2021848   .0807057     2.51   0.012     .0440045    .3603651
------------------------------------------------------------------------------

.                         margins,dydx(i_populism)

Average marginal effects                                 Number of obs = 2,899
Model VCE: Robust

Expression: Pr(noexp), predict()
dy/dx wrt:  i_populism

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
  i_populism |  -.0649346   .0709684    -0.91   0.360      -.20403    .0741608
------------------------------------------------------------------------------

.                          
.                         ********************
.                         * Elite experience *
.                         ********************
.                         nbreg tenure persparty ld if s==1, cluster(cowcode)

Fitting Poisson model:

Iteration 0:  Log pseudolikelihood = -7968.5765  
Iteration 1:  Log pseudolikelihood = -7968.5765  

Fitting constant-only model:

Iteration 0:  Log pseudolikelihood =  -8021.729  
Iteration 1:  Log pseudolikelihood = -7259.8688  
Iteration 2:  Log pseudolikelihood = -7258.8582  
Iteration 3:  Log pseudolikelihood = -7258.8573  
Iteration 4:  Log pseudolikelihood = -7258.8573  

Fitting full model:

Iteration 0:  Log pseudolikelihood = -7244.1282  
Iteration 1:  Log pseudolikelihood = -7244.0451  
Iteration 2:  Log pseudolikelihood = -7244.0451  

Negative binomial regression                            Number of obs =  2,994
                                                        Wald chi2(2)  =   3.63
Dispersion: mean                                        Prob > chi2   = 0.1632
Log pseudolikelihood = -7244.0451                       Pseudo R2     = 0.0020

                               (Std. err. adjusted for 81 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
      tenure | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |  -.3251284   .1979724    -1.64   0.101    -.7131472    .0628903
          ld |  -.0145561   .0513354    -0.28   0.777    -.1151717    .0860594
       _cons |   1.777599   .2454211     7.24   0.000     1.296583    2.258615
-------------+----------------------------------------------------------------
    /lnalpha |  -1.603056   .1870253                     -1.969619   -1.236493
-------------+----------------------------------------------------------------
       alpha |   .2012804   .0376445                        .13951    .2904007
------------------------------------------------------------------------------

.                         est store tenure0

.                         nbreg tenure persparty ld ivdem if s==1, cluster(cowcode)
>  

Fitting Poisson model:

Iteration 0:  Log pseudolikelihood = -7967.6177  
Iteration 1:  Log pseudolikelihood = -7967.6177  

Fitting constant-only model:

Iteration 0:  Log pseudolikelihood =  -8021.729  
Iteration 1:  Log pseudolikelihood = -7259.8688  
Iteration 2:  Log pseudolikelihood = -7258.8582  
Iteration 3:  Log pseudolikelihood = -7258.8573  
Iteration 4:  Log pseudolikelihood = -7258.8573  

Fitting full model:

Iteration 0:  Log pseudolikelihood = -7243.6388  
Iteration 1:  Log pseudolikelihood = -7243.5508  
Iteration 2:  Log pseudolikelihood = -7243.5508  

Negative binomial regression                            Number of obs =  2,994
                                                        Wald chi2(3)  =   3.85
Dispersion: mean                                        Prob > chi2   = 0.2785
Log pseudolikelihood = -7243.5508                       Pseudo R2     = 0.0021

                               (Std. err. adjusted for 81 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
      tenure | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |  -.3241238   .1956361    -1.66   0.098    -.7075635    .0593159
          ld |  -.0282219   .0653422    -0.43   0.666    -.1562903    .0998465
       ivdem |   .1163483   .3378521     0.34   0.731    -.5458296    .7785262
       _cons |   1.737669   .2692258     6.45   0.000     1.209997    2.265342
-------------+----------------------------------------------------------------
    /lnalpha |  -1.603568   .1867604                     -1.969612   -1.237525
-------------+----------------------------------------------------------------
       alpha |   .2011774    .037572                       .139511    .2901015
------------------------------------------------------------------------------

.                         est store tenure1

.                         nbreg tenure persparty ld ivdem pres if s==1, cluster(cow
> code) 

Fitting Poisson model:

Iteration 0:  Log pseudolikelihood =  -7952.813  
Iteration 1:  Log pseudolikelihood =  -7952.813  

Fitting constant-only model:

Iteration 0:  Log pseudolikelihood =  -8021.729  
Iteration 1:  Log pseudolikelihood = -7259.8688  
Iteration 2:  Log pseudolikelihood = -7258.8582  
Iteration 3:  Log pseudolikelihood = -7258.8573  
Iteration 4:  Log pseudolikelihood = -7258.8573  

Fitting full model:

Iteration 0:  Log pseudolikelihood =  -7236.408  
Iteration 1:  Log pseudolikelihood = -7236.2253  
Iteration 2:  Log pseudolikelihood = -7236.2253  

Negative binomial regression                            Number of obs =  2,994
                                                        Wald chi2(4)  =   5.58
Dispersion: mean                                        Prob > chi2   = 0.2324
Log pseudolikelihood = -7236.2253                       Pseudo R2     = 0.0031

                               (Std. err. adjusted for 81 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
      tenure | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |  -.2993166   .1931595    -1.55   0.121    -.6779024    .0792691
          ld |  -.0376129   .0612261    -0.61   0.539    -.1576139    .0823882
       ivdem |   .0774888    .322404     0.24   0.810    -.5544115     .709389
        pres |  -.0971574   .0697277    -1.39   0.164    -.2338212    .0395064
       _cons |   1.829117   .2591758     7.06   0.000     1.321142    2.337093
-------------+----------------------------------------------------------------
    /lnalpha |  -1.611623   .1869037                     -1.977947   -1.245298
-------------+----------------------------------------------------------------
       alpha |   .1995636   .0372992                       .138353    .2878551
------------------------------------------------------------------------------

.                         est store tenure2

.                         nbreg tenure persparty ld ivdem lpop l1gdp if s==1, clust
> er(cowcode)

Fitting Poisson model:

Iteration 0:  Log pseudolikelihood = -7741.4476  
Iteration 1:  Log pseudolikelihood = -7741.4476  

Fitting constant-only model:

Iteration 0:  Log pseudolikelihood =  -7793.499  
Iteration 1:  Log pseudolikelihood =  -7058.626  
Iteration 2:  Log pseudolikelihood = -7057.5363  
Iteration 3:  Log pseudolikelihood = -7057.5353  
Iteration 4:  Log pseudolikelihood = -7057.5353  

Fitting full model:

Iteration 0:  Log pseudolikelihood = -7033.4463  
Iteration 1:  Log pseudolikelihood =  -7033.228  
Iteration 2:  Log pseudolikelihood =  -7033.228  

Negative binomial regression                            Number of obs =  2,910
                                                        Wald chi2(5)  =  10.35
Dispersion: mean                                        Prob > chi2   = 0.0659
Log pseudolikelihood = -7033.228                        Pseudo R2     = 0.0034

                               (Std. err. adjusted for 79 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
      tenure | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |  -.3257319   .2286389    -1.42   0.154    -.7738559    .1223921
          ld |  -.0725016   .0645133    -1.12   0.261    -.1989453    .0539421
       ivdem |   -.088353   .3767795    -0.23   0.815    -.8268272    .6501212
        lpop |  -.0149224   .0223616    -0.67   0.505    -.0587503    .0289055
       l1gdp |   .0012239   .0009105     1.34   0.179    -.0005607    .0030085
       _cons |   2.150499   .5065734     4.25   0.000     1.157633    3.143365
-------------+----------------------------------------------------------------
    /lnalpha |  -1.603285   .1859355                     -1.967712   -1.238858
-------------+----------------------------------------------------------------
       alpha |   .2012345   .0374166                      .1397764     .289715
------------------------------------------------------------------------------

.                         est store tenure3

.                         nbreg tenure persparty ld ivdem i.xage male edulevel i.po
> wer i.office1 if s==1, cluster(cowcode)

Fitting Poisson model:

Iteration 0:  Log pseudolikelihood = -7501.1839  
Iteration 1:  Log pseudolikelihood = -7501.1818  
Iteration 2:  Log pseudolikelihood = -7501.1818  

Fitting constant-only model:

Iteration 0:  Log pseudolikelihood = -8006.9028  
Iteration 1:  Log pseudolikelihood = -7247.1137  
Iteration 2:  Log pseudolikelihood = -7246.0994  
Iteration 3:  Log pseudolikelihood = -7246.0985  
Iteration 4:  Log pseudolikelihood = -7246.0985  

Fitting full model:

Iteration 0:  Log pseudolikelihood = -7014.7487  
Iteration 1:  Log pseudolikelihood =  -6994.011  
Iteration 2:  Log pseudolikelihood = -6993.8084  
Iteration 3:  Log pseudolikelihood = -6993.8084  

Negative binomial regression                            Number of obs =  2,989
                                                        Wald chi2(21) = 162.19
Dispersion: mean                                        Prob > chi2   = 0.0000
Log pseudolikelihood = -6993.8084                       Pseudo R2     = 0.0348

                                   (Std. err. adjusted for 81 clusters in cowcode)
----------------------------------------------------------------------------------
                 |               Robust
          tenure | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-----------------+----------------------------------------------------------------
       persparty |  -.3020266    .230684    -1.31   0.190    -.7541589    .1501057
              ld |  -.0571724    .067722    -0.84   0.399     -.189905    .0755602
           ivdem |   .0348643   .3515121     0.10   0.921    -.6540867    .7238153
                 |
            xage |
              1  |   -.073116   .1138683    -0.64   0.521    -.2962939    .1500618
              2  |   -.033229   .1117407    -0.30   0.766    -.2522367    .1857787
              3  |  -.0526622   .1116747    -0.47   0.637    -.2715405    .1662161
              4  |   .0877305   .1072866     0.82   0.414    -.1225474    .2980084
              5  |   .1111994    .112266     0.99   0.322    -.1088378    .3312366
              6  |   .0757022   .1075749     0.70   0.482    -.1351407    .2865452
              7  |   .0480583   .1095313     0.44   0.661    -.1666191    .2627358
              8  |   .1861347   .1247272     1.49   0.136    -.0583261    .4305956
                 |
            male |  -.0669864   .0341994    -1.96   0.050     -.134016    .0000432
        edulevel |   .0011443   .0135936     0.08   0.933    -.0254987    .0277873
                 |
           power |
             No  |  -.1860015   .0975988    -1.91   0.057    -.3772917    .0052888
        Top ten  |  -.0518024   .1035101    -0.50   0.617    -.2546785    .1510736
                 |
         office1 |
Executive Staff  |   .2708366   .0782848     3.46   0.001     .1174011     .424272
   Party Leader  |   .5224586   .1031284     5.07   0.000     .3203307    .7245866
Assembly Leader  |   .2508719   .0818049     3.07   0.002     .0905373    .4112066
Assembly back..  |   .5619468   .1771136     3.17   0.002     .2148106     .909083
  Supreme Court  |   .4365934   .0848382     5.15   0.000     .2703136    .6028732
Other Unelect..  |   .3749566   .1161726     3.23   0.001     .1472624    .6026507
                 |
           _cons |   1.793548    .325706     5.51   0.000     1.155176     2.43192
-----------------+----------------------------------------------------------------
        /lnalpha |  -1.875439   .1768667                     -2.222091   -1.528786
-----------------+----------------------------------------------------------------
           alpha |   .1532877   .0271115                      .1083822    .2167986
----------------------------------------------------------------------------------

.                         est store tenure4

.                         nbreg tenure persparty ld ivdem i_populism if s==1, clust
> er(cowcode)

Fitting Poisson model:

Iteration 0:  Log pseudolikelihood = -7887.0222  
Iteration 1:  Log pseudolikelihood = -7887.0222  

Fitting constant-only model:

Iteration 0:  Log pseudolikelihood = -7976.0505  
Iteration 1:  Log pseudolikelihood = -7216.1917  
Iteration 2:  Log pseudolikelihood = -7215.2022  
Iteration 3:  Log pseudolikelihood = -7215.2014  
Iteration 4:  Log pseudolikelihood = -7215.2014  

Fitting full model:

Iteration 0:  Log pseudolikelihood = -7185.3089  
Iteration 1:  Log pseudolikelihood = -7184.9872  
Iteration 2:  Log pseudolikelihood = -7184.9872  

Negative binomial regression                            Number of obs =  2,976
                                                        Wald chi2(4)  =  10.11
Dispersion: mean                                        Prob > chi2   = 0.0386
Log pseudolikelihood = -7184.9872                       Pseudo R2     = 0.0042

                               (Std. err. adjusted for 79 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
      tenure | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |  -.3572033   .1829184    -1.95   0.051    -.7157168    .0013102
          ld |  -.0064103   .0655467    -0.10   0.922    -.1348796    .1220589
       ivdem |   .2171906   .3338244     0.65   0.515    -.4370933    .8714744
  i_populism |   .2720914   .1251974     2.17   0.030     .0267091    .5174737
       _cons |   1.489054   .3090218     4.82   0.000     .8833829    2.094726
-------------+----------------------------------------------------------------
    /lnalpha |  -1.623436   .1953493                     -2.006313   -1.240558
-------------+----------------------------------------------------------------
       alpha |     .19722   .0385268                      .1344836    .2892228
------------------------------------------------------------------------------

.                         est store tenure5

.                         nbreg tenure persparty ld ivdem i.region if s==1, cluster
> (cowcode)

Fitting Poisson model:

Iteration 0:  Log pseudolikelihood = -7951.7524  
Iteration 1:  Log pseudolikelihood = -7951.7524  

Fitting constant-only model:

Iteration 0:  Log pseudolikelihood =  -8021.729  
Iteration 1:  Log pseudolikelihood = -7259.8688  
Iteration 2:  Log pseudolikelihood = -7258.8582  
Iteration 3:  Log pseudolikelihood = -7258.8573  
Iteration 4:  Log pseudolikelihood = -7258.8573  

Fitting full model:

Iteration 0:  Log pseudolikelihood = -7235.7483  
Iteration 1:  Log pseudolikelihood = -7235.5281  
Iteration 2:  Log pseudolikelihood = -7235.5281  

Negative binomial regression                            Number of obs =  2,994
                                                        Wald chi2(7)  =   6.47
Dispersion: mean                                        Prob > chi2   = 0.4861
Log pseudolikelihood = -7235.5281                       Pseudo R2     = 0.0032

                               (Std. err. adjusted for 81 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
      tenure | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |  -.3712138   .2180026    -1.70   0.089    -.7984909    .0560634
          ld |  -.0322896   .0640659    -0.50   0.614    -.1578565    .0932773
       ivdem |   .0500612   .3272551     0.15   0.878     -.591347    .6914694
             |
      region |
   Americas  |    .010361   .1410866     0.07   0.941    -.2661637    .2868856
       Asia  |  -.0077158   .1228209    -0.06   0.950    -.2484403    .2330088
     Europe  |   .0837227    .125674     0.67   0.505    -.1625937    .3300391
       MENA  |    .143452   .1665995     0.86   0.389     -.183077     .469981
             |
       _cons |   1.785958   .2810576     6.35   0.000     1.235095    2.336821
-------------+----------------------------------------------------------------
    /lnalpha |   -1.61219    .185136                      -1.97505    -1.24933
-------------+----------------------------------------------------------------
       alpha |   .1994503   .0369254                      .1387544    .2866967
------------------------------------------------------------------------------

.                         est store tenure6

.                         qui predict xnb

.                         twoway lpolyci xnb persparty,bw(.125)legend(off)xtit(Part
> y personalism)ytit(Years)

.                         drop xnb

. 
.                         * Margins *
.                         qui nbreg tenure persparty ld ivdem i.pregion i_populism 
> if s==1, cluster(cowcode)

.                         qui centile persparty if e(sample)==1,centile(5 95)

.                         local c1 = r(c_1)

.                         local c2 = r(c_2)

.                         margins,at(persparty=(`c1' `c2'))predict(n)

Predictive margins                                       Number of obs = 2,976
Model VCE: Robust

Expression: Predicted number of events, predict(n)
1._at: persparty = .1619093
2._at: persparty = .8125014

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         _at |
          1  |   5.469581   .3991322    13.70   0.000     4.687296    6.251866
          2  |   4.209229   .3354274    12.55   0.000     3.551803    4.866654
------------------------------------------------------------------------------

.                         margins,at(persparty=(`c1' `c2'))predict(n)     contrast(
> atcontrast(r._at))

Contrasts of predictive margins                          Number of obs = 2,976
Model VCE: Robust

Expression: Predicted number of events, predict(n)
1._at: persparty = .1619093
2._at: persparty = .8125014

------------------------------------------------
             |         df        chi2     P>chi2
-------------+----------------------------------
         _at |          1        3.55     0.0594
------------------------------------------------

--------------------------------------------------------------
             |            Delta-method
             |   Contrast   std. err.     [95% conf. interval]
-------------+------------------------------------------------
         _at |
   (2 vs 1)  |  -1.260352    .668665     -2.570912    .0502069
--------------------------------------------------------------

.                         qui centile i_populism if e(sample)==1,centile(5 95)

.                         local c1 = r(c_1)

.                         local c2 = r(c_2)

.                         margins,at(i_populism=(`c1' `c2'))predict(n)

Predictive margins                                       Number of obs = 2,976
Model VCE: Robust

Expression: Predicted number of events, predict(n)
1._at: i_populism = .064
2._at: i_populism =  .91

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         _at |
          1  |   4.451193   .2546878    17.48   0.000     3.952015    4.950372
          2  |   5.520417    .395329    13.96   0.000     4.745586    6.295248
------------------------------------------------------------------------------

.                         margins,at(i_populism=(`c1' `c2'))predict(n)contrast(atco
> ntrast(r._at)) 

Contrasts of predictive margins                          Number of obs = 2,976
Model VCE: Robust

Expression: Predicted number of events, predict(n)
1._at: i_populism = .064
2._at: i_populism =  .91

------------------------------------------------
             |         df        chi2     P>chi2
-------------+----------------------------------
         _at |          1        3.55     0.0594
------------------------------------------------

--------------------------------------------------------------
             |            Delta-method
             |   Contrast   std. err.     [95% conf. interval]
-------------+------------------------------------------------
         _at |
   (2 vs 1)  |   1.069224   .5672272     -.0425213    2.180968
--------------------------------------------------------------

. 
.                   * Kitchen sink, unreported *
.                         logit exp_party persparty num ld ivdem i.xage male edulev
> el i.power i.office1 lpop ///
>                                 l1gdp pres popul if s==1,cluster(cowcode) 

Iteration 0:  Log pseudolikelihood = -1898.8278  
Iteration 1:  Log pseudolikelihood =  -1709.093  
Iteration 2:  Log pseudolikelihood = -1705.7133  
Iteration 3:  Log pseudolikelihood = -1705.6987  
Iteration 4:  Log pseudolikelihood = -1705.6987  

Logistic regression                                     Number of obs =  2,809
                                                        Wald chi2(26) =  74.26
                                                        Prob > chi2   = 0.0000
Log pseudolikelihood = -1705.6987                       Pseudo R2     = 0.1017

                                   (Std. err. adjusted for 74 clusters in cowcode)
----------------------------------------------------------------------------------
                 |               Robust
       exp_party | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-----------------+----------------------------------------------------------------
       persparty |  -1.629286   .9758105    -1.67   0.095    -3.541839    .2832675
             num |  -1.492765    .321089    -4.65   0.000    -2.122088   -.8634417
              ld |  -.3712162   .2735252    -1.36   0.175    -.9073157    .1648833
           ivdem |   .8981845   1.462671     0.61   0.539    -1.968598    3.764967
                 |
            xage |
              1  |    .355561   .2978287     1.19   0.233    -.2281724    .9392945
              2  |   .4395055   .2728457     1.61   0.107    -.0952622    .9742732
              3  |   .0891815   .2930399     0.30   0.761    -.4851661     .663529
              4  |  -.0336851   .2674875    -0.13   0.900     -.557951    .4905807
              5  |   .1299619   .2895103     0.45   0.654     -.437468    .6973917
              6  |  -.0993542   .2367216    -0.42   0.675    -.5633201    .3646117
              7  |  -.0303549    .219561    -0.14   0.890    -.4606866    .3999768
              8  |  -.0805728   .2776784    -0.29   0.772    -.6248126    .4636669
                 |
            male |   .1390052   .1213891     1.15   0.252    -.0989131    .3769235
        edulevel |     .02602    .043573     0.60   0.550    -.0593814    .1114215
                 |
           power |
             No  |   .4315964   .3658853     1.18   0.238    -.2855257    1.148719
        Top ten  |   .3665829   .3620444     1.01   0.311    -.3430111    1.076177
                 |
         office1 |
Executive Staff  |   .6377614    .328478     1.94   0.052    -.0060437    1.281566
   Party Leader  |   .8863182   .2428981     3.65   0.000     .4102467     1.36239
Assembly Leader  |   .3409838   .1741169     1.96   0.050    -.0002791    .6822466
Assembly back..  |   .3648559   .3238853     1.13   0.260    -.2699477    .9996594
  Supreme Court  |  -.6142588   .3569561    -1.72   0.085     -1.31388    .0853622
Other Unelect..  |   .4413397   .7653589     0.58   0.564    -1.058736    1.941416
                 |
            lpop |   .0049769   .1104569     0.05   0.964    -.2115146    .2214685
           l1gdp |   .0039782   .0042966     0.93   0.355     -.004443    .0123994
            pres |   .0376809   .3548105     0.11   0.915     -.657735    .7330967
        populism |  -.2822607   .5742762    -0.49   0.623    -1.407821    .8432999
           _cons |   .4881603     2.4064     0.20   0.839    -4.228296    5.204617
----------------------------------------------------------------------------------

.                         nbreg tenure persparty num ld ivdem i.xage male edulevel 
> i.power i.office1 lpop ///
>                                 l1gdp pres popul lnparty if s==1,cluster(cowcode)
>  

Fitting Poisson model:

Iteration 0:  Log pseudolikelihood = -6871.4635  
Iteration 1:  Log pseudolikelihood = -6871.4495  
Iteration 2:  Log pseudolikelihood = -6871.4495  

Fitting constant-only model:

Iteration 0:  Log pseudolikelihood = -7502.2119  
Iteration 1:  Log pseudolikelihood = -6765.8414  
Iteration 2:  Log pseudolikelihood = -6765.2893  
Iteration 3:  Log pseudolikelihood =  -6765.289  

Fitting full model:

Iteration 0:  Log pseudolikelihood = -6509.1866  
Iteration 1:  Log pseudolikelihood = -6480.0391  
Iteration 2:  Log pseudolikelihood = -6479.5833  
Iteration 3:  Log pseudolikelihood = -6479.5832  

Negative binomial regression                            Number of obs =  2,809
                                                        Wald chi2(27) = 284.30
Dispersion: mean                                        Prob > chi2   = 0.0000
Log pseudolikelihood = -6479.5832                       Pseudo R2     = 0.0422

                                   (Std. err. adjusted for 74 clusters in cowcode)
----------------------------------------------------------------------------------
                 |               Robust
          tenure | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-----------------+----------------------------------------------------------------
       persparty |   -.720569   .3558525    -2.02   0.043    -1.418027   -.0231109
             num |  -.2087198   .0651159    -3.21   0.001    -.3363446    -.081095
              ld |  -.0656318   .0679993    -0.97   0.334    -.1989081    .0676444
           ivdem |   -.118068   .3535056    -0.33   0.738    -.8109264    .5747903
                 |
            xage |
              1  |  -.1306258   .1166401    -1.12   0.263    -.3592362    .0979846
              2  |    -.06567    .113408    -0.58   0.563    -.2879455    .1566055
              3  |  -.0914802    .111059    -0.82   0.410    -.3091518    .1261913
              4  |   .0176804   .0994754     0.18   0.859    -.1772879    .2126487
              5  |   .0836437   .1054616     0.79   0.428    -.1230572    .2903446
              6  |   .0518292   .1016687     0.51   0.610    -.1474377    .2510962
              7  |   .0371533   .1024785     0.36   0.717    -.1637008    .2380075
              8  |   .2057909   .1096311     1.88   0.061    -.0090821    .4206638
                 |
            male |  -.0417612   .0334115    -1.25   0.211    -.1072465    .0237242
        edulevel |  -.0004091   .0142044    -0.03   0.977    -.0282492     .027431
                 |
           power |
             No  |  -.0853712    .097571    -0.87   0.382    -.2766068    .1058645
        Top ten  |   .0179326   .1076158     0.17   0.868    -.1929905    .2288556
                 |
         office1 |
Executive Staff  |   .2345145   .0701132     3.34   0.001     .0970952    .3719339
   Party Leader  |   .5439658   .0805436     6.75   0.000     .3861032    .7018284
Assembly Leader  |    .276588   .0765599     3.61   0.000     .1265334    .4266426
Assembly back..  |   .6444871   .1734081     3.72   0.000     .3046134    .9843608
  Supreme Court  |   .4773992   .0821282     5.81   0.000     .3164309    .6383674
Other Unelect..  |   .2770327   .1103291     2.51   0.012     .0607916    .4932737
                 |
            lpop |  -.0018617   .0270594    -0.07   0.945    -.0548971    .0511738
           l1gdp |   .0006676   .0009785     0.68   0.495    -.0012503    .0025855
            pres |   -.113874    .081522    -1.40   0.162    -.2736542    .0459063
        populism |   .1999503    .159191     1.26   0.209    -.1120583    .5119589
      lnpartyage |  -.0582837   .0532696    -1.09   0.274    -.1626902    .0461229
           _cons |   2.270277   .6512302     3.49   0.000     .9938894    3.546665
-----------------+----------------------------------------------------------------
        /lnalpha |  -1.998789   .2092879                     -2.408986   -1.588593
-----------------+----------------------------------------------------------------
           alpha |   .1354992   .0283583                      .0899064    .2042128
----------------------------------------------------------------------------------

.  
.                 
. *********************************************************************************
> ************************************
. ******** Comparative Candidate Survey (CCS) to examine candidate political experi
> ence & nomination control **********
. *********************************************************************************
> ************************************
.                         use "$dir\pers-use.dta",clear

.                         sort v2paid year,

.                         save, replace
file
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\pers-use
    > .dta saved

.                         clear all

.                         set more off 

.                         set matsize 1000
set matsize ignored.
    Matrix sizes are no longer limited by c(matsize) in modern Statas.  Matrix
    sizes are now limited by edition of Stata.  See limits for more details.

.                         global seed ="984353"

.                         set scheme plotplain

.                         usespss "$dir\CCS_Data_Wave1_v4.0.sav",clear
 
usespss is converting file C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-
> reproduction\CCS_Data_Wave1_v4.0.sav
 
USESPSS
Attempting to convert: C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-repr
> oduction\CCS_Data_Wave1_v4.0.sav
Processing started: 7/26/2023 3:58:59 PM
Number of cases: 18568
Signature (must be "$FL2"):$FL2
Product line: @(#) IBM SPSS STATISTICS 64-bit MS Windows 23.0.0.2         
No file label found
Creation date and time:14 Dec 16 10:27:19
This is an SPSS/Windows file
File size is 30041412 bytes
File contains 18568 cases
Case size is 10408 bytes in 1301 chunks (1chunk = 8bytes)
Data compression: yes (compression bias is 100)
Weighting is not set


Found record 7.3[8*4]: Source system characteristics
    Release number:                     23
    Release sub-number:                 0
    Special release identifier number:  2
    Machine code:                       suppressed
    Floating-point representation code: 1 (IEEE)
    Compression scheme code:            1
    Byte order code:                    2 (little-endian)
    Character representation code:      1252

Found record 7.4[3*8]: Source system floating pt constants
    skipped

Found record 7.11[801*4]: Msmt level, col width, & alignment
    processed

Found record 7.13[2043*1]: Extended variable names
    processed

Found record 7.14[102*1]: Extended strings
    skipped

Found record 7.16[2*8]: 64 bit N of cases
    skipped

Found record 7.18[4063*1]: Variable attributes
    skipped

Found record 7.20[12*1]: Code page
    Codepage: Western Alphabet (Windows-1252)
    processed

Busy - processing variables (267 variables)

Busy - processing data (267 variables)
Allocating buffer for decompressed data...
10408 bytes
Allocating buffer for variable descriptors...
7476 bytes
Memory set!
Starting decompression: 3:58:59 PM
Optimized data record size is:3075
Allocated 1048576 bytes for the write buffer
Write buffer capacity is 341 records
All done: 3:59:00 PM
Data saved to C:\Users\jgw12\AppData\Local\Temp\ST_46dc_000001.tmp
t0     a4a5   a7b3   a11a4  b5b1   b6c3   b8f    b12b   c2b    c7e    d5g    e11
t1     a4a6   a7b4   a11b1  b5b2   b6c4   B8F0   B12B0  c2c    c7f    d5h    e12a
t2     a4b1   a7b5   a11b2  b5b3   b6c5   B8F1   B12B1  c2d    c7g    d6a    e12b
t3     a4b2   a7b6   a11b3  b5b4   b6c6   B8F2   B12B2  c2e    c7h    d6b    e12c
t4     a4b3   a7b7   a11b4  b5b5   b6c7   b9a    b13    c2f    c7i    d6c    e13
t5     a4b4   a7b8   a12    b5b6   b7     b9b    b14a   c2g    c7k    d7a    e14
t6     a4b5   a7b9   b1a    b5b7   b8a    b9c    b14b   c2h    d1     d7b    e15a
t7     a4b6   a8a    b1b    b6a1   b8b    b9d    b14c   c2i    d2     d7c    E15A0
t8     a5a    a8b    b1c    b6a2   B8B0   b9e    b15    c2j    d3a    d7d    E15A1
t9     a5b    a8c    b2     b6a3   B8B1   b9f    b16    c2k    d3b    e1     E15A2
t10    a6a    a9a    b3a    b6a4   B8B2   b9g    c1a    c2l    d3c    e2     e15b
t11    a6b    a9b    b3b    b6a5   b8c    b10a   C1A0   c2m    d3d    e3     E15B0
t12    a7a1   a9c    b4     b6a6   B8C0   b10b   C1A1   c2n    d3e    e3a    E15B1
a1     a7a2   a9d    b5a1   b6a7   B8C1   b10c   C1A2   c3     d3f    e4     E15B2
a2     a7a3   a9e    b5a2   b6b1   B8C2   b10d   c1b    c3a    d4a    e4a
a3a    a7a4   a9f    b5a3   b6b2   b8d    b10e   C1B0   c4     d4b    e4b
a3b1   a7a5   a9g    b5a4   b6b3   B8D0   b11a1  C1B1   c5     d4c    e6a
a3b2   a7a6   a9h    b5a5   b6b4   B8D1   b11a2  C1B2   c6     d5a    e6b
a3b3   a7a7   a10a   b5a6   b6b5   B8D2   b11b   c1c    c7     d5b    e7
a4a1   a7a8   a10b   b5a7   b6b6   b8e    b11c1  C1C0   c7a    d5c    e7a
a4a2   a7a9   a11a1  b5a8   b6b7   B8E0   b11c2  C1C1   c7b    d5d    e8
a4a3   a7b1   a11a2  b5a9   b6c1   B8E1   b11d   C1C2   c7c    d5e    e9
a4a4   a7b2   a11a3  b5a10  b6c2   B8E2   b12a   c2a    c7d    d5f    e10

.                 
.                 *******************************
.                 **** Variable construction ****
.                 *******************************
.                         rename t1 countryid

.                         rename t3 year

.                         rename t8 elected

.                         rename t10 districtmagnitude

.                         rename t11 ballottype

.                         rename t12 incentive  /* continuous rank, but not equal i
> nterval */

. 
.                         * Demographic data *
.                         recode e1 (1=1) (2=0) (.a .b .c=.),gen(male)
(6,965 differences between e1 and male)

.                         recode e2 (.a .b .c=.),gen(birthyr)
(2,304 differences between e2 and birthyr)

.                         replace birthyr=. if birthyr<100
(2,678 real changes made, 2,678 to missing)

.                         gen age = year-birthyr
(4,982 missing values generated)

.                         hist age
(bin=41, start=18, width=1.9512195)

. 
.                         * Is the party leader too powerful *
.                         sum d7c

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
         d7c |     13,437    3.454045    1.130476          1          5

.                         gen partyleadertoopowerful = ((d7c*-1)+5)/4
(5,131 missing values generated)

.                         tab d7c partyleadertoopowerful

 The party leader |           partyleadertoopowerful
  is too powerful |         0        .25         .5        .75 |     Total
------------------+--------------------------------------------+----------
   strongly agree |         0          0          0          0 |       808 
            agree |         0          0          0      2,095 |     2,095 
          neither |         0          0      3,123          0 |     3,123 
         disagree |         0      5,010          0          0 |     5,010 
strongly disagree |     2,401          0          0          0 |     2,401 
------------------+--------------------------------------------+----------
            Total |     2,401      5,010      3,123      2,095 |    13,437 


                  | partyleade
                  | rtoopowerf
 The party leader |     ul
  is too powerful |         1 |     Total
------------------+-----------+----------
   strongly agree |       808 |       808 
            agree |         0 |     2,095 
          neither |         0 |     3,123 
         disagree |         0 |     5,010 
strongly disagree |         0 |     2,401 
------------------+-----------+----------
            Total |       808 |    13,437 

.                          
.                          * Political experience *
.                         recode a1 (97=.),gen(party_num)
(144 differences between a1 and party_num)

.                         gen partytime = year-a2
(2,767 missing values generated)

.                         replace partytime=0 if a2==0  /* never joined a party */
(178 real changes made)

.                         gen sqpartytime = partytime^(1/2)
(2,769 missing values generated)

.                         swilk sqpartytime

                   Shapiro–Wilk W test for normal data

    Variable |        Obs       W           V         z       Prob>z
-------------+------------------------------------------------------
 sqpartytime |     15,799    0.99145     62.867    11.216    0.00000

Note: The normal approximation to the sampling distribution of W'
      is valid for 4<=n<=2000.

.                         gen candidate = a4a1==1 | a4a2 ==1 | a4a3 ==1 | a4a4 ==1 
> | a4a5 ==1 | a4a6 ==1  ///
>                                 if a4a1~=. | a4a2~=. | a4a3~=. | a4a4~=. | a4a5~=
> . | a4a6~=. 

.                         recode a5a (1=1) (2=0) (.a .b .c=.),gen(exp_leg)
(17,009 differences between a5a and exp_leg)

.                         recode a5b (.a .b .c=.) ,gen(yrs_exp_leg)
(17,018 differences between a5b and yrs_exp_leg)

.                         replace yrs_exp_leg =0 if exp_leg==0
(10,214 real changes made)

.                         recode a6a (1=1) (2=0) (.a .b .c=.),gen(exp_party)
(17,011 differences between a6a and exp_party)

.                         recode a6b (.a .b .c=.) ,gen(yrs_exp_party)
(17,486 differences between a6b and yrs_exp_party)

.                         replace yrs_exp_party =0 if exp_party==0
(12,061 real changes made)

. 
.                         gen yrs_exp_any = yrs_exp_leg if yrs_exp_leg~=. 
(6,804 missing values generated)

.                         replace yrs_exp_any = yrs_exp_party if (yrs_exp_party>yrs
> _exp_leg & yrs_exp_leg~=. &  yrs_exp_party~=.) | yrs_exp_leg==.
(3,055 real changes made)

.                         gen exp_any = exp_leg==1   if exp_leg~=. 
(6,360 missing values generated)

.                         replace exp_any= exp_party if exp_leg==.
(2,218 real changes made)

. 
.                         local var = "leg party any"

.                         foreach v of local var {
  2.                                 replace yrs_exp_`v' = ln(1+(yrs_exp_`v'^(1/2))
> )
  3.                                 swilk yrs_exp_`v'
  4.                         }
(1,094 real changes made)

                   Shapiro–Wilk W test for normal data

    Variable |        Obs       W           V         z       Prob>z
-------------+------------------------------------------------------
 yrs_exp_leg |     11,764    0.98605     79.835    11.776    0.00000

Note: The normal approximation to the sampling distribution of W'
      is valid for 4<=n<=2000.
(1,036 real changes made)

                   Shapiro–Wilk W test for normal data

    Variable |        Obs       W           V         z       Prob>z
-------------+------------------------------------------------------
yrs_exp_pa~y |     13,143    0.98089    120.245    12.913    0.00000

Note: The normal approximation to the sampling distribution of W'
      is valid for 4<=n<=2000.
(1,790 real changes made)

                   Shapiro–Wilk W test for normal data

    Variable |        Obs       W           V         z       Prob>z
-------------+------------------------------------------------------
 yrs_exp_any |     14,147    0.98937     71.222    11.523    0.00000

Note: The normal approximation to the sampling distribution of W'
      is valid for 4<=n<=2000.

. 
.                 ****************************************
.                 ***** Code for V-Parties partyids ******
.                 ****************************************
.                         gen v2paid=.
(18,568 missing values generated)

.                         replace v2paid =        .       if countryid==  1       &
>  year==        2007    & a1==  4
(0 real changes made)

.                         replace v2paid =        1209    if countryid==  1       &
>  year==        2007    & a1==  5
(117 real changes made)

.                         replace v2paid =        1209    if countryid==  1       &
>  year==        2010    & a1==  2
(107 real changes made)

.                         replace v2paid =        424     if countryid==  1       &
>  year==        2007    & a1==  2
(86 real changes made)

.                         replace v2paid =        424     if countryid==  1       &
>  year==        2010    & a1==  1
(72 real changes made)

.                         replace v2paid =        .       if countryid==  1       &
>  year==        2007    & a1==  8
(0 real changes made)

.                         replace v2paid =        .       if countryid==  1       &
>  year==        2007    & a1==  7
(0 real changes made)

.                         replace v2paid =        486     if countryid==  1       &
>  year==        2007    & a1==  1
(66 real changes made)

.                         replace v2paid =        .       if countryid==  1       &
>  year==        2010    & a1==  3
(0 real changes made)

.                         replace v2paid =        .       if countryid==  1       &
>  year==        2007    & a1==  3
(0 real changes made)

.                         replace v2paid =        .       if countryid==  1       &
>  year==        2007    & a1==  6
(0 real changes made)

.                         replace v2paid =        599     if countryid==  14      &
>  year==        2008    & a1==  5
(75 real changes made)

.                         replace v2paid =        .       if countryid==  14      &
>  year==        2008    & a1==  7
(0 real changes made)

.                         replace v2paid =        463     if countryid==  14      &
>  year==        2008    & a1==  4
(155 real changes made)

.                         replace v2paid =        .       if countryid==  14      &
>  year==        2008    & a1==  6
(0 real changes made)

.                         replace v2paid =        1659    if countryid==  14      &
>  year==        2008    & a1==  3
(215 real changes made)

.                         replace v2paid =        .       if countryid==  14      &
>  year==        2008    & a1==  14
(0 real changes made)

.                         replace v2paid =        .       if countryid==  14      &
>  year==        2008    & a1==  8
(0 real changes made)

.                         replace v2paid =        .       if countryid==  14      &
>  year==        2008    & a1==  9
(0 real changes made)

.                         replace v2paid =        .       if countryid==  14      &
>  year==        2008    & a1==  11
(0 real changes made)

.                         replace v2paid =        1329    if countryid==  14      &
>  year==        2008    & a1==  2
(220 real changes made)

.                         replace v2paid =        .       if countryid==  14      &
>  year==        2008    & a1==  10
(0 real changes made)

.                         replace v2paid =        1384    if countryid==  14      &
>  year==        2008    & a1==  1
(170 real changes made)

.                         replace v2paid =        .       if countryid==  14      &
>  year==        2008    & a1==  12
(0 real changes made)

.                         replace v2paid =        .       if countryid==  14      &
>  year==        2008    & a1==  13
(0 real changes made)

.                         replace v2paid =        756     if countryid==  7       &
>  year==        2007    & a1==  11
(51 real changes made)

.                         replace v2paid =        756     if countryid==  7       &
>  year==        2010    & a1==  11
(67 real changes made)

.                         replace v2paid =        .       if countryid==  7       &
>  year==        2010    & a1==  9
(0 real changes made)

.                         replace v2paid =        .       if countryid==  7       &
>  year==        2007    & a1==  3
(0 real changes made)

.                         replace v2paid =        .       if countryid==  7       &
>  year==        2010    & a1==  3
(0 real changes made)

.                         replace v2paid =        622     if countryid==  7       &
>  year==        2010    & a1==  5
(0 real changes made)

.                         replace v2paid =        1563    if countryid==  7       &
>  year==        2007    & a1==  4
(50 real changes made)

.                         replace v2paid =        1563    if countryid==  7       &
>  year==        2010    & a1==  4
(59 real changes made)

.                         replace v2paid =        .       if countryid==  7       &
>  year==        2010    & a1==  6
(0 real changes made)

.                         replace v2paid =        .       if countryid==  7       &
>  year==        2007    & a1==  5
(0 real changes made)

.                         replace v2paid =        .       if countryid==  7       &
>  year==        2007    & a1==  17
(0 real changes made)

.                         replace v2paid =        .       if countryid==  7       &
>  year==        2010    & a1==  17
(0 real changes made)

.                         replace v2paid =        .       if countryid==  7       &
>  year==        2010    & a1==  7
(0 real changes made)

.                         replace v2paid =        .       if countryid==  7       &
>  year==        2010    & a1==  18
(0 real changes made)

.                         replace v2paid =        .       if countryid==  7       &
>  year==        2007    & a1==  18
(0 real changes made)

.                         replace v2paid =        789     if countryid==  7       &
>  year==        2007    & a1==  2
(48 real changes made)

.                         replace v2paid =        789     if countryid==  7       &
>  year==        2010    & a1==  2
(47 real changes made)

.                         replace v2paid =        36      if countryid==  7       &
>  year==        2007    & a1==  12
(15 real changes made)

.                         replace v2paid =        36      if countryid==  7       &
>  year==        2010    & a1==  12
(75 real changes made)

.                         replace v2paid =        .       if countryid==  7       &
>  year==        2007    & a1==  15
(0 real changes made)

.                         replace v2paid =        .       if countryid==  7       &
>  year==        2010    & a1==  19
(0 real changes made)

.                         replace v2paid =        500     if countryid==  7       &
>  year==        2007    & a1==  1
(44 real changes made)

.                         replace v2paid =        500     if countryid==  7       &
>  year==        2010    & a1==  1
(44 real changes made)

.                         replace v2paid =        1680    if countryid==  7       &
>  year==        2007    & a1==  13
(37 real changes made)

.                         replace v2paid =        1680    if countryid==  7       &
>  year==        2010    & a1==  13
(54 real changes made)

.                         replace v2paid =        1586    if countryid==  7       &
>  year==        2007    & a1==  14
(10 real changes made)

.                         replace v2paid =        1586    if countryid==  7       &
>  year==        2010    & a1==  10
(0 real changes made)

.                         replace v2paid =        .       if countryid==  7       &
>  year==        2010    & a1==  16
(0 real changes made)

.                         replace v2paid =        .       if countryid==  7       &
>  year==        2007    & a1==  16
(0 real changes made)

.                         replace v2paid =        .       if countryid==  7       &
>  year==        2010    & a1==  15
(0 real changes made)

.                         replace v2paid =        .       if countryid==  7       &
>  year==        2010    & a1==  8
(0 real changes made)

.                         replace v2paid =        1739    if countryid==  9       &
>  year==        2008    & a1==  1
(168 real changes made)

.                         replace v2paid =        152     if countryid==  9       &
>  year==        2008    & a1==  2
(170 real changes made)

.                         replace v2paid =        .       if countryid==  16      &
>  year==        2011    & a1==  15
(0 real changes made)

.                         replace v2paid =        .       if countryid==  16      &
>  year==        2011    & a1==  5
(0 real changes made)

.                         replace v2paid =        536     if countryid==  16      &
>  year==        2011    & a1==  8
(36 real changes made)

.                         replace v2paid =        1022    if countryid==  16      &
>  year==        2011    & a1==  9
(42 real changes made)

.                         replace v2paid =        .       if countryid==  16      &
>  year==        2011    & a1==  12
(0 real changes made)

.                         replace v2paid =        .       if countryid==  16      &
>  year==        2011    & a1==  16
(0 real changes made)

.                         replace v2paid =        .       if countryid==  16      &
>  year==        2011    & a1==  11
(0 real changes made)

.                         replace v2paid =        .       if countryid==  16      &
>  year==        2011    & a1==  6
(0 real changes made)

.                         replace v2paid =        .       if countryid==  16      &
>  year==        2011    & a1==  10
(0 real changes made)

.                         replace v2paid =        1204    if countryid==  16      &
>  year==        2011    & a1==  7
(40 real changes made)

.                         replace v2paid =        .       if countryid==  16      &
>  year==        2011    & a1==  14
(0 real changes made)

.                         replace v2paid =        .       if countryid==  16      &
>  year==        2011    & a1==  13
(0 real changes made)

.                         replace v2paid =        1527    if countryid==  16      &
>  year==        2011    & a1==  1
(59 real changes made)

.                         replace v2paid =        379     if countryid==  16      &
>  year==        2011    & a1==  3
(35 real changes made)

.                         replace v2paid =        .       if countryid==  16      &
>  year==        2011    & a1==  4
(0 real changes made)

.                         replace v2paid =        329     if countryid==  16      &
>  year==        2011    & a1==  2
(46 real changes made)

.                         replace v2paid =        533     if countryid==  11      &
>  year==        2011    & a1==  2
(9 real changes made)

.                         replace v2paid =        .       if countryid==  11      &
>  year==        2011    & a1==  5
(0 real changes made)

.                         replace v2paid =        1040    if countryid==  11      &
>  year==        2011    & a1==  6
(15 real changes made)

.                         replace v2paid =        .       if countryid==  11      &
>  year==        2011    & a1==  1
(0 real changes made)

.                         replace v2paid =        821     if countryid==  11      &
>  year==        2011    & a1==  3
(37 real changes made)

.                         replace v2paid =        110     if countryid==  11      &
>  year==        2011    & a1==  4
(35 real changes made)

.                         replace v2paid =        .       if countryid==  11      &
>  year==        2011    & a1==  9
(0 real changes made)

.                         replace v2paid =        1150    if countryid==  11      &
>  year==        2011    & a1==  8
(49 real changes made)

.                         replace v2paid =        685     if countryid==  11      &
>  year==        2011    & a1==  7
(41 real changes made)

.                         replace v2paid =        .       if countryid==  6       &
>  year==        2011    & a1==  10
(0 real changes made)

.                         replace v2paid =        901     if countryid==  6       &
>  year==        2011    & a1==  4
(86 real changes made)

.                         replace v2paid =        901     if countryid==  6       &
>  year==        2007    & a1==  1
(51 real changes made)

.                         replace v2paid =        .       if countryid==  6       &
>  year==        2011    & a1==  11
(0 real changes made)

.                         replace v2paid =        .       if countryid==  6       &
>  year==        2007    & a1==  6
(0 real changes made)

.                         replace v2paid =        .       if countryid==  6       &
>  year==        2011    & a1==  7
(0 real changes made)

.                         replace v2paid =        .       if countryid==  6       &
>  year==        2007    & a1==  9
(0 real changes made)

.                         replace v2paid =        .       if countryid==  6       &
>  year==        2007    & a1==  16
(0 real changes made)

.                         replace v2paid =        .       if countryid==  6       &
>  year==        2007    & a1==  17
(0 real changes made)

.                         replace v2paid =        .       if countryid==  6       &
>  year==        2011    & a1==  17
(0 real changes made)

.                         replace v2paid =        479     if countryid==  6       &
>  year==        2011    & a1==  6
(88 real changes made)

.                         replace v2paid =        479     if countryid==  6       &
>  year==        2007    & a1==  5
(71 real changes made)

.                         replace v2paid =        .       if countryid==  6       &
>  year==        2007    & a1==  13
(0 real changes made)

.                         replace v2paid =        .       if countryid==  6       &
>  year==        2007    & a1==  14
(0 real changes made)

.                         replace v2paid =        .       if countryid==  6       &
>  year==        2007    & a1==  15
(0 real changes made)

.                         replace v2paid =        .       if countryid==  6       &
>  year==        2011    & a1==  13
(0 real changes made)

.                         replace v2paid =        7548    if countryid==  6       &
>  year==        2007    & a1==  4
(72 real changes made)

.                         replace v2paid =        .       if countryid==  6       &
>  year==        2007    & a1==  10
(0 real changes made)

.                         replace v2paid =        .       if countryid==  6       &
>  year==        2011    & a1==  12
(0 real changes made)

.                         replace v2paid =        495     if countryid==  6       &
>  year==        2007    & a1==  2
(57 real changes made)

.                         replace v2paid =        495     if countryid==  6       &
>  year==        2011    & a1==  1
(63 real changes made)

.                         replace v2paid =        .       if countryid==  6       &
>  year==        2007    & a1==  12
(0 real changes made)

.                         replace v2paid =        .       if countryid==  6       &
>  year==        2007    & a1==  18
(0 real changes made)

.                         replace v2paid =        .       if countryid==  6       &
>  year==        2011    & a1==  9
(0 real changes made)

.                         replace v2paid =        .       if countryid==  6       &
>  year==        2007    & a1==  11
(0 real changes made)

.                         replace v2paid =        1303    if countryid==  6       &
>  year==        2011    & a1==  2
(86 real changes made)

.                         replace v2paid =        1303    if countryid==  6       &
>  year==        2007    & a1==  3
(77 real changes made)

.                         replace v2paid =        .       if countryid==  6       &
>  year==        2011    & a1==  14
(0 real changes made)

.                         replace v2paid =        .       if countryid==  6       &
>  year==        2007    & a1==  7
(0 real changes made)

.                         replace v2paid =        .       if countryid==  6       &
>  year==        2011    & a1==  8
(0 real changes made)

.                         replace v2paid =        .       if countryid==  6       &
>  year==        2011    & a1==  16
(0 real changes made)

.                         replace v2paid =        1689    if countryid==  6       &
>  year==        2011    & a1==  3
(96 real changes made)

.                         replace v2paid =        7548    if countryid==  6       &
>  year==        2011    & a1==  5
(103 real changes made)

.                         replace v2paid =        1689    if countryid==  6       &
>  year==        2007    & a1==  8
(49 real changes made)

.                         replace v2paid =        .       if countryid==  6       &
>  year==        2011    & a1==  15
(0 real changes made)

.                         replace v2paid =        .       if countryid==  3       &
>  year==        2009    & a1==  5
(0 real changes made)

.                         replace v2paid =        .       if countryid==  3       &
>  year==        2005    & a1==  5
(0 real changes made)

.                         replace v2paid =        1375    if countryid==  3       &
>  year==        2005    & a1==  2
(177 real changes made)

.                         replace v2paid =        1375    if countryid==  3       &
>  year==        2009    & a1==  2
(150 real changes made)

.                         replace v2paid =        1731    if countryid==  3       &
>  year==        2005    & a1==  3
(30 real changes made)

.                         replace v2paid =        1731    if countryid==  3       &
>  year==        2009    & a1==  3
(26 real changes made)

.                         replace v2paid =        .       if countryid==  3       &
>  year==        2009    & a1==  6
(0 real changes made)

.                         replace v2paid =        573     if countryid==  3       &
>  year==        2005    & a1==  4
(203 real changes made)

.                         replace v2paid =        573     if countryid==  3       &
>  year==        2009    & a1==  4
(149 real changes made)

.                         replace v2paid =        .       if countryid==  3       &
>  year==        2005    & a1==  6
(0 real changes made)

.                         replace v2paid =        383     if countryid==  3       &
>  year==        2005    & a1==  1
(182 real changes made)

.                         replace v2paid =        383     if countryid==  3       &
>  year==        2009    & a1==  1
(158 real changes made)

.                         replace v2paid =        .       if countryid==  3       &
>  year==        2005    & a1==  7
(0 real changes made)

.                         replace v2paid =        794     if countryid==  5       &
>  year==        2009    & a1==  1
(106 real changes made)

.                         replace v2paid =        1468    if countryid==  5       &
>  year==        2009    & a1==  2
(86 real changes made)

.                         replace v2paid =        1651    if countryid==  5       &
>  year==        2011    & a1==  4
(0 real changes made)

.                         replace v2paid =        1660    if countryid==  5       &
>  year==        2011    & a1==  5
(0 real changes made)

.                         replace v2paid =        1160    if countryid==  5       &
>  year==        2011    & a1==  6
(0 real changes made)

.                         replace v2paid =        794     if countryid==  5       &
>  year==        2011    & a1==  1
(0 real changes made)

.                         replace v2paid =        794     if countryid==  5       &
>  year==        2007    & a1==  1
(95 real changes made)

.                         replace v2paid =        1468    if countryid==  5       &
>  year==        2007    & a1==  2
(146 real changes made)

.                         replace v2paid =        1468    if countryid==  5       &
>  year==        2011    & a1==  2
(0 real changes made)

.                         replace v2paid =        301     if countryid==  5       &
>  year==        2011    & a1==  3
(0 real changes made)

.                         replace v2paid =        1691    if countryid==  13      &
>  year==        2010    & a1==  1
(150 real changes made)

.                         replace v2paid =        42      if countryid==  13      &
>  year==        2010    & a1==  4
(111 real changes made)

.                         replace v2paid =        1412    if countryid==  13      &
>  year==        2010    & a1==  2
(13 real changes made)

.                         replace v2paid =        1650    if countryid==  13      &
>  year==        2010    & a1==  5
(70 real changes made)

.                         replace v2paid =        1408    if countryid==  13      &
>  year==        2010    & a1==  3
(53 real changes made)

.                         replace v2paid =        457     if countryid==  12      &
>  year==        2009    & a1==  4
(94 real changes made)

.                         replace v2paid =        224     if countryid==  12      &
>  year==        2009    & a1==  6
(95 real changes made)

.                         replace v2paid =        363     if countryid==  12      &
>  year==        2009    & a1==  3
(92 real changes made)

.                         replace v2paid =        1224    if countryid==  12      &
>  year==        2009    & a1==  5
(33 real changes made)

.                         replace v2paid =        964     if countryid==  12      &
>  year==        2009    & a1==  2
(85 real changes made)

.                         replace v2paid =        1396    if countryid==  12      &
>  year==        2009    & a1==  1
(97 real changes made)

.                         replace v2paid =        1055    if countryid==  4       &
>  year==        2007    & a1==  1
(42 real changes made)

.                         replace v2paid =        1288    if countryid==  4       &
>  year==        2007    & a1==  2
(38 real changes made)

.                         replace v2paid =        .       if countryid==  4       &
>  year==        2007    & a1==  3
(0 real changes made)

.                         replace v2paid =        2735    if countryid==  4       &
>  year==        2007    & a1==  7
(24 real changes made)

.                         replace v2paid =        562     if countryid==  4       &
>  year==        2007    & a1==  4
(30 real changes made)

.                         replace v2paid =        .       if countryid==  4       &
>  year==        2007    & a1==  5
(0 real changes made)

.                         replace v2paid =        4       if countryid==  4       &
>  year==        2007    & a1==  6
(12 real changes made)

.                         replace v2paid =        1157    if countryid==  8       &
>  year==        2006    & a1==  1
(32 real changes made)

.                         replace v2paid =        .       if countryid==  8       &
>  year==        2006    & a1==  7
(0 real changes made)

.                         replace v2paid =        45      if countryid==  8       &
>  year==        2006    & a1==  8
(18 real changes made)

.                         replace v2paid =        .       if countryid==  8       &
>  year==        2006    & a1==  6
(0 real changes made)

.                         replace v2paid =        298     if countryid==  8       &
>  year==        2006    & a1==  5
(0 real changes made)

.                         replace v2paid =        .       if countryid==  8       &
>  year==        2006    & a1==  10
(0 real changes made)

.                         replace v2paid =        1234    if countryid==  8       &
>  year==        2006    & a1==  2
(22 real changes made)

.                         replace v2paid =        .       if countryid==  8       &
>  year==        2006    & a1==  9
(0 real changes made)

.                         replace v2paid =        1363    if countryid==  8       &
>  year==        2006    & a1==  3
(25 real changes made)

.                         replace v2paid =        828     if countryid==  8       &
>  year==        2006    & a1==  4
(26 real changes made)

.                         replace v2paid =        1310    if countryid==  10      &
>  year==        2009    & a1==  1
(42 real changes made)

.                         replace v2paid =        1310    if countryid==  10      &
>  year==        2011    & a1==  1
(52 real changes made)

.                         replace v2paid =        1308    if countryid==  10      &
>  year==        2009    & a1==  2
(56 real changes made)

.                         replace v2paid =        284     if countryid==  10      &
>  year==        2009    & a1==  3
(25 real changes made)

.                         replace v2paid =        655     if countryid==  10      &
>  year==        2009    & a1==  5
(29 real changes made)

.                         replace v2paid =        1359    if countryid==  10      &
>  year==        2009    & a1==  4
(50 real changes made)

.                         replace v2paid =        1308    if countryid==  10      &
>  year==        2011    & a1==  2
(62 real changes made)

.                         replace v2paid =        .       if countryid==  10      &
>  year==        2011    & a1==  4
(0 real changes made)

.                         replace v2paid =        .       if countryid==  10      &
>  year==        2011    & a1==  3
(0 real changes made)

.                         replace v2paid =        655     if countryid==  10      &
>  year==        2011    & a1==  6
(45 real changes made)

.                         replace v2paid =        1359    if countryid==  10      &
>  year==        2011    & a1==  5
(56 real changes made)

.                         replace v2paid =        651     if countryid==  15      &
>  year==        2010    & a1==  4
(227 real changes made)

.                         replace v2paid =        .       if countryid==  15      &
>  year==        2010    & a1==  6
(0 real changes made)

.                         replace v2paid =        .       if countryid==  15      &
>  year==        2010    & a1==  2
(0 real changes made)

.                         replace v2paid =        456     if countryid==  15      &
>  year==        2010    & a1==  5
(236 real changes made)

.                         replace v2paid =        830     if countryid==  15      &
>  year==        2010    & a1==  9
(228 real changes made)

.                         replace v2paid =        1274    if countryid==  15      &
>  year==        2010    & a1==  3
(172 real changes made)

.                         replace v2paid =        487     if countryid==  15      &
>  year==        2010    & a1==  7
(303 real changes made)

.                         replace v2paid =        409     if countryid==  15      &
>  year==        2010    & a1==  8
(27 real changes made)

.                         replace v2paid =        199     if countryid==  15      &
>  year==        2010    & a1==  1
(229 real changes made)

.                         replace v2paid =        1415    if countryid==  2       &
>  year==        2011    & a1==  19
(83 real changes made)

.                         replace v2paid =        .       if countryid==  2       &
>  year==        2007    & a1==  8
(0 real changes made)

.                         replace v2paid =        .       if countryid==  2       &
>  year==        2011    & a1==  8
(0 real changes made)

.                         replace v2paid =        .       if countryid==  2       &
>  year==        2007    & a1==  1
(0 real changes made)

.                         replace v2paid =        .       if countryid==  2       &
>  year==        2011    & a1==  2
(0 real changes made)

.                         replace v2paid =        .       if countryid==  2       &
>  year==        2007    & a1==  10
(0 real changes made)

.                         replace v2paid =        .       if countryid==  2       &
>  year==        2011    & a1==  16
(0 real changes made)

.                         replace v2paid =        .       if countryid==  2       &
>  year==        2011    & a1==  7
(0 real changes made)

.                         replace v2paid =        .       if countryid==  2       &
>  year==        2007    & a1==  9
(0 real changes made)

.                         replace v2paid =        360     if countryid==  2       &
>  year==        2007    & a1==  2
(235 real changes made)

.                         replace v2paid =        360     if countryid==  2       &
>  year==        2011    & a1==  1
(190 real changes made)

.                         replace v2paid =        .       if countryid==  2       &
>  year==        2007    & a1==  15
(0 real changes made)

.                         replace v2paid =        .       if countryid==  2       &
>  year==        2007    & a1==  16
(0 real changes made)

.                         replace v2paid =        .       if countryid==  2       &
>  year==        2011    & a1==  17
(0 real changes made)

.                         replace v2paid =        1759    if countryid==  2       &
>  year==        2007    & a1==  6
(27 real changes made)

.                         replace v2paid =        1759    if countryid==  2       &
>  year==        2011    & a1==  10
(121 real changes made)

.                         replace v2paid =        .       if countryid==  2       &
>  year==        2007    & a1==  5
(0 real changes made)

.                         replace v2paid =        .       if countryid==  2       &
>  year==        2011    & a1==  13
(0 real changes made)

.                         replace v2paid =        .       if countryid==  2       &
>  year==        2011    & a1==  6
(0 real changes made)

.                         replace v2paid =        .       if countryid==  2       &
>  year==        2007    & a1==  12
(0 real changes made)

.                         replace v2paid =        .       if countryid==  2       &
>  year==        2011    & a1==  18
(0 real changes made)

.                         replace v2paid =        .       if countryid==  2       &
>  year==        2007    & a1==  7
(0 real changes made)

.                         replace v2paid =        .       if countryid==  2       &
>  year==        2011    & a1==  11
(0 real changes made)

.                         replace v2paid =        .       if countryid==  2       &
>  year==        2011    & a1==  12
(0 real changes made)

.                         replace v2paid =        .       if countryid==  2       &
>  year==        2011    & a1==  9
(0 real changes made)

.                         replace v2paid =        .       if countryid==  2       &
>  year==        2007    & a1==  13
(0 real changes made)

.                         replace v2paid =        .       if countryid==  2       &
>  year==        2011    & a1==  5
(0 real changes made)

.                         replace v2paid =        .       if countryid==  2       &
>  year==        2007    & a1==  11
(0 real changes made)

.                         replace v2paid =        .       if countryid==  2       &
>  year==        2011    & a1==  15
(0 real changes made)

.                         replace v2paid =        .       if countryid==  2       &
>  year==        2007    & a1==  14
(0 real changes made)

.                         replace v2paid =        29      if countryid==  2       &
>  year==        2011    & a1==  3
(272 real changes made)

.                         replace v2paid =        .       if countryid==  2       &
>  year==        2007    & a1==  4
(0 real changes made)

.                         replace v2paid =        308     if countryid==  2       &
>  year==        2007    & a1==  3
(215 real changes made)

.                         replace v2paid =        308     if countryid==  2       &
>  year==        2011    & a1==  4
(150 real changes made)

.                         replace v2paid =        177     if countryid==  18      &
>  year==        2006    & a1==  1
(18 real changes made)

.                         replace v2paid =        676     if countryid==  18      &
>  year==        2006    & a1==  2
(70 real changes made)

.                         replace v2paid =        1728    if countryid==  18      &
>  year==        2006    & a1==  3
(18 real changes made)

.                         replace v2paid =        466     if countryid==  18      &
>  year==        2006    & a1==  4
(37 real changes made)

.                         replace v2paid =        1554    if countryid==  18      &
>  year==        2006    & a1==  5
(24 real changes made)

.                         replace v2paid =        .       if countryid==  21      &
>  year==        2013    & a1==  1
(0 real changes made)

.                         replace v2paid =        2280    if countryid==  21      &
>  year==        2013    & a1==  2
(31 real changes made)

.                         replace v2paid =        365     if countryid==  21      &
>  year==        2013    & a1==  3
(73 real changes made)

.                         replace v2paid =        1221    if countryid==  21      &
>  year==        2013    & a1==  4
(32 real changes made)

.                         replace v2paid =        2046    if countryid==  21      &
>  year==        2013    & a1==  5
(135 real changes made)

.                         replace v2paid =        802     if countryid==  21      &
>  year==        2013    & a1==  6
(145 real changes made)

.                         replace v2paid =        .       if countryid==  21      &
>  year==        2013    & a1==  7
(0 real changes made)

.                         replace v2paid =        2281    if countryid==  21      &
>  year==        2013    & a1==  8
(69 real changes made)

.                         replace v2paid =        7031    if countryid==  21      &
>  year==        2013    & a1==  9
(67 real changes made)

.                         replace v2paid =        .       if countryid==  21      &
>  year==        2013    & a1==  10
(0 real changes made)

.                         replace v2paid =        201     if countryid==  21      &
>  year==        2013    & a1==  11
(36 real changes made)

.                         replace v2paid =        .       if countryid==  20      &
>  year==        2011    & a1==  6
(0 real changes made)

.                         replace v2paid =        1099    if countryid==  20      &
>  year==        2011    & a1==  3
(44 real changes made)

.                         replace v2paid =        1049    if countryid==  20      &
>  year==        2011    & a1==  1
(35 real changes made)

.                         replace v2paid =        .       if countryid==  20      &
>  year==        2011    & a1==  8
(0 real changes made)

.                         replace v2paid =        .       if countryid==  20      &
>  year==        2011    & a1==  5
(0 real changes made)

.                         replace v2paid =        1824    if countryid==  20      &
>  year==        2011    & a1==  2
(24 real changes made)

.                         replace v2paid =        591     if countryid==  20      &
>  year==        2011    & a1==  4
(16 real changes made)

.                         replace v2paid =        .       if countryid==  20      &
>  year==        2011    & a1==  7
(0 real changes made)

.                         replace v2paid =        .       if countryid==  19      &
>  year==        2009    & a1==  2
(0 real changes made)

.                         replace v2paid =        101     if countryid==  19      &
>  year==        2009    & a1==  7
(147 real changes made)

.                         replace v2paid =        .       if countryid==  19      &
>  year==        2009    & a1==  6
(0 real changes made)

.                         replace v2paid =        705     if countryid==  19      &
>  year==        2009    & a1==  4
(140 real changes made)

.                         replace v2paid =        1072    if countryid==  19      &
>  year==        2009    & a1==  3
(147 real changes made)

.                         replace v2paid =        719     if countryid==  19      &
>  year==        2009    & a1==  1
(155 real changes made)

.                         replace v2paid =        1173    if countryid==  19      &
>  year==        2009    & a1==  5
(136 real changes made)

.                         replace v2paid =        5940    if countryid==  17      &
>  year==        2012    & a1==  9
(49 real changes made)

.                         replace v2paid =        2473    if countryid==  17      &
>  year==        2012    & a1==  8
(14 real changes made)

.                         replace v2paid =        .       if countryid==  17      &
>  year==        2012    & a1==  3
(0 real changes made)

.                         replace v2paid =        660     if countryid==  17      &
>  year==        2012    & a1==  6
(40 real changes made)

.                         replace v2paid =        1750    if countryid==  17      &
>  year==        2012    & a1==  7
(6 real changes made)

.                         replace v2paid =        481     if countryid==  17      &
>  year==        2012    & a1==  2
(37 real changes made)

.                         replace v2paid =        2474    if countryid==  17      &
>  year==        2012    & a1==  11
(82 real changes made)

.                         replace v2paid =        120     if countryid==  17      &
>  year==        2012    & a1==  1
(39 real changes made)

.                         replace v2paid =        1105    if countryid==  17      &
>  year==        2012    & a1==  10
(100 real changes made)

.                         replace v2paid =        1541    if countryid==  17      &
>  year==        2012    & a1==  4
(2 real changes made)

.                         replace v2paid =        5941    if countryid==  17      &
>  year==        2012    & a1==  5
(33 real changes made)

.                         replace v2paid =        .       if countryid==  23      &
>  year==        2010    & a1==  8
(0 real changes made)

.                         replace v2paid =        1567    if countryid==  23      &
>  year==        2010    & a1==  2
(164 real changes made)

.                         replace v2paid =        .       if countryid==  23      &
>  year==        2010    & a1==  9
(0 real changes made)

.                         replace v2paid =        .       if countryid==  23      &
>  year==        2010    & a1==  5
(0 real changes made)

.                         replace v2paid =        1516    if countryid==  23      &
>  year==        2010    & a1==  1
(242 real changes made)

.                         replace v2paid =        1388    if countryid==  23      &
>  year==        2010    & a1==  3
(319 real changes made)

.                         replace v2paid =        .       if countryid==  23      &
>  year==        2010    & a1==  11
(0 real changes made)

.                         replace v2paid =        .       if countryid==  23      &
>  year==        2010    & a1==  10
(0 real changes made)

.                         replace v2paid =        601     if countryid==  23      &
>  year==        2010    & a1==  4
(210 real changes made)

.                         replace v2paid =        .       if countryid==  23      &
>  year==        2010    & a1==  7
(0 real changes made)

.                         replace v2paid =        986     if countryid==  23      &
>  year==        2010    & a1==  6
(27 real changes made)

. 
.                 ****************************
.                 ***** Merge data sets ******
.                 ****************************
.                         sort v2paid year

.                         merge v2paid year using "$dir\vdem-parties-merge.dta"
(you are using old merge syntax; see [D] merge for new syntax)
variables v2paid year do not uniquely identify observations in the master data
(variable v2paid was float, now double to accommodate using data's values)
(variable year was int, now float to accommodate using data's values)

.                         drop if _merge==2
(97,408 observations deleted)

.                         keep if v2paid~=.  
(6,238 observations deleted)

.                         rename _merge mergeA1

.                         sort v2paid year

.                         merge v2paid year using "$dir\pers-use.dta"
(you are using old merge syntax; see [D] merge for new syntax)
variables v2paid year do not uniquely identify observations in the master data
(variable year was float, now double to accommodate using data's values)
variables v2paid year do not uniquely identify observations in
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\pers-use
    > .dta
(label paactcom_ord already defined)
(label paanteli_ord already defined)
(label paclient_ord already defined)
(label paculsup_ord already defined)
(label padisa_ord already defined)
(label pagender_ord already defined)
(label paimmig_ord already defined)
(label paind_ord already defined)
(label palgbt_ord already defined)
(label palocoff_ord already defined)
(label paminor_ord already defined)
(label panom_ord already defined)
(label paopresp_ord already defined)
(label papariah_ord already defined)
(label papeople_ord already defined)
(label paplur_ord already defined)
(label parelig_ord already defined)
(label pariglef_ord already defined)
(label pasoctie_ord already defined)
(label paviol_ord already defined)
(label pawelf_ord already defined)
(label pawomlab_ord already defined)
(label regiongeo already defined)
(label regionpol already defined)
(label regionpol_6C already defined)
(label storical already defined)
(label oject already defined)
(label paallian already defined)
(label paelcont already defined)
(label pagovsup already defined)

.                         drop if _merge==2
(2,372 observations deleted)

.                         rename _merge mergeA2

.                 
.                 ***********************
.                 *** More variables ***
.                 **********************
.                         qui reg partytime v2paind

.                         gen s=e(sample)

.                         egen surveyid =group(year countryid) if s==1
(2,481 missing values generated)

.                         egen idcyp = group(year countryid v2paid) if s==1
(2,481 missing values generated)

.                         replace partytime=partytime+1
(10,380 real changes made)

.                         egen psize = count(year) if s==1,by(v2paid)
(2,481 missing values generated)

.                         drop partyage

.                         gen partyage = pminyear-year
(627 missing values generated)

.                         recode e6a (1 2 3 =1) (4 5 6 =2) (7=3) (8 99 =0) (.a .b =
> -1),gen(education)
(12,315 differences between e6a and education)

.                         qui sum v2paind

.                         replace v2paind  = (v2paind+(abs(r(min)))) / (abs(r(min))
> +r(max))
(11,703 real changes made)

.                          
.                 *************************************************************
.                 *** Create individual-level political experience measures ***
.                 *************************************************************
.                          desc a9a a9b a9c  a9e a9f a9g

Variable      Storage   Display    Value
    name         type    format    label      Variable label
-----------------------------------------------------------------------------------
a9a             double  %16.2f     a9a        Years served as mayor
a9b             double  %16.2f     a9b        Years served as member of local
                                                government
a9c             double  %16.2f     a9c        Years served as member of regional
                                                government
a9e             double  %16.2f     a9e        Years served as member of local
                                                parliament
a9f             double  %16.2f     a9f        Years served as member of regional
                                                parliament
a9g             double  %16.2f     a9g        Years served as member of national
                                                parliament

.                          desc a8a a8b a8c

Variable      Storage   Display    Value
    name         type    format    label      Variable label
-----------------------------------------------------------------------------------
a8a             double  %16.2f     a8a        How many years local party office?
a8b             double  %16.2f     a8b        How many years regional party office?
a8c             double  %16.2f     a8c        How many years national party office?

.                          egen xyrsgov =rowmax(a9a a9b a9c  a9e a9f a9g)
(2,349 missing values generated)

.                          egen xyrsparty =rowmax(a8a a8b a8c)
(2,747 missing values generated)

.                          gen lnxyrsgov = ln(1+ xyrsgov)
(2,349 missing values generated)

.                          gen lnxyrsparty = ln(1+xyrsparty)
(2,747 missing values generated)

.                          
.                 ***************************************
.                 *** Some descriptive plots          ***
.                 *** Fidesz appears to be an outlier ***
.                 ***************************************
.                         twoway (lpolyci  xyrsparty v2paind,bw(.1)col(blue)yaxis(2
> )) ///
>                                 (lpolyci  xyrsgov v2paind,bw(.1)col(green)yaxis(2
> )   ///
>                                 legend(lab(1 "Party experience")lab(3 "Government
>  experience") ///
>                                  order(1 3)ring(0)pos(7)) ///
>                                 xtit(Party personalism)ytit("Years experience",ax
> is(2)))

.                                 
.                         twoway (lpolyci  xyrsparty v2paind if v2paid~=1691,bw(.1)
> col(blue)yaxis(2)) ///
>                                 (lpolyci  xyrsgov v2paind if v2paid~=1691,bw(.1)c
> ol(green)yaxis(2)   ///
>                                 legend(lab(1 "Party experience")lab(3 "Government
>  experience") ///
>                                  order(1 3)ring(0)pos(7)) ///
>                                 xtit(Party personalism)ytit("Years experience",ax
> is(2)))

.                  
.                         twoway (lpoly xyrsparty v2paind,bw(.1)col(blue)) ///
>                                 (lpoly xyrsparty v2paind if v2paid~=1691,bw(.1)co
> l(red) ///
>                                 xlab(0(.2)1)legend(lab(1 "All parties")lab(2 "All
>  but Fidesz")order(1 2) ///
>                                 ring(0)pos(7))tit(Fidesz is an outlier) ///
>                                 xtit(Party personalism)ytit(Elite experience,heig
> ht(-3)))

. 
.                 *************************************
.                 *** Candidate experience Analysis ***
.                 *************************************
.                                         drop id 

.                                         egen id=group(countryid year)

.                                         sum id

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
          id |     12,330    16.40876    8.790926          1         29

.                                         gen govexp = round(xyrsgov,1)
(2,349 missing values generated)

.                                         gen parexp = round(xyrsparty,1)
(2,747 missing values generated)

.                                         gen opposition= v2pagovsup==3 if v2pagovs
> up~=.
(627 missing values generated)

.                                         global d = "v2paind"

.                                         * Baseline reported model *
.                                         xtnbreg govexp $d,i(id) 
warning: existing panel variable is not id

Fitting negative binomial (constant dispersion) model:

Iteration 0:  Log likelihood = -49695.763  
Iteration 1:  Log likelihood =  -49695.75  
Iteration 2:  Log likelihood =  -49695.75  

Iteration 0:  Log likelihood = -34745.149  
Iteration 1:  Log likelihood = -26545.713  
Iteration 2:  Log likelihood = -24736.714  
Iteration 3:  Log likelihood = -24429.357  
Iteration 4:  Log likelihood = -24428.803  
Iteration 5:  Log likelihood = -24428.803  

Iteration 0:  Log likelihood = -24428.803  
Iteration 1:  Log likelihood = -24265.739  
Iteration 2:  Log likelihood = -24262.437  
Iteration 3:  Log likelihood = -24262.435  

Fitting full model:

Iteration 0:  Log likelihood = -30175.887  
Iteration 1:  Log likelihood = -28671.557  (not concave)
Iteration 2:  Log likelihood = -24889.541  
Iteration 3:  Log likelihood = -23598.233  
Iteration 4:  Log likelihood = -23523.483  
Iteration 5:  Log likelihood = -23522.871  
Iteration 6:  Log likelihood = -23522.869  
Iteration 7:  Log likelihood = -23522.869  

Random-effects negative binomial regression          Number of obs    =  9,441
Group variable: id                                   Number of groups =     26

Random effects u_i ~ Beta                            Obs per group:
                                                                  min =    101
                                                                  avg =  363.1
                                                                  max =  1,182

                                                     Wald chi2(1)     = 122.61
Log likelihood = -23522.869                          Prob > chi2      = 0.0000

------------------------------------------------------------------------------
      govexp | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.8944117   .0807749   -11.07   0.000    -1.052728   -.7360958
       _cons |  -.4227275   .0282834   -14.95   0.000    -.4781619   -.3672931
-------------+----------------------------------------------------------------
       /ln_r |   .7269314   .2627437                      .2119633    1.241899
       /ln_s |   2.567639   .2932035                       1.99297    3.142307
-------------+----------------------------------------------------------------
           r |   2.068723   .5435438                      1.236102    3.462184
           s |   13.03501    3.82191                      7.337295    23.15723
------------------------------------------------------------------------------
LR test vs. pooled: chibar2(01) = 1479.13              Prob >= chibar2 = 0.000

.                                         predict cnt1 if e(sample)==1,nu0
(2,889 missing values generated)

.                                         
.                                         ** Model specification checks *
.                                         xtnbreg govexp $d,i(countryid) 
warning: existing panel variable is not countryid

Fitting negative binomial (constant dispersion) model:

Iteration 0:  Log likelihood = -49695.763  
Iteration 1:  Log likelihood =  -49695.75  
Iteration 2:  Log likelihood =  -49695.75  

Iteration 0:  Log likelihood = -34745.149  
Iteration 1:  Log likelihood = -26545.713  
Iteration 2:  Log likelihood = -24736.714  
Iteration 3:  Log likelihood = -24429.357  
Iteration 4:  Log likelihood = -24428.803  
Iteration 5:  Log likelihood = -24428.803  

Iteration 0:  Log likelihood = -24428.803  
Iteration 1:  Log likelihood = -24265.739  
Iteration 2:  Log likelihood = -24262.437  
Iteration 3:  Log likelihood = -24262.435  

Fitting full model:

Iteration 0:  Log likelihood = -30264.367  
Iteration 1:  Log likelihood = -28926.239  (not concave)
Iteration 2:  Log likelihood = -25589.721  
Iteration 3:  Log likelihood = -23658.737  
Iteration 4:  Log likelihood = -23557.149  
Iteration 5:  Log likelihood = -23526.997  
Iteration 6:  Log likelihood = -23526.638  
Iteration 7:  Log likelihood = -23526.629  
Iteration 8:  Log likelihood = -23526.629  

Random-effects negative binomial regression          Number of obs    =  9,441
Group variable: countryid                            Number of groups =     21

Random effects u_i ~ Beta                            Obs per group:
                                                                  min =    101
                                                                  avg =  449.6
                                                                  max =  1,182

                                                     Wald chi2(1)     = 115.59
Log likelihood = -23526.629                          Prob > chi2      = 0.0000

------------------------------------------------------------------------------
      govexp | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.8642177   .0803834   -10.75   0.000    -1.021766   -.7066692
       _cons |   -.435306   .0281406   -15.47   0.000    -.4904605   -.3801515
-------------+----------------------------------------------------------------
       /ln_r |   .7681503   .2925936                      .1946775    1.341623
       /ln_s |   2.609681   .3249543                      1.972782     3.24658
-------------+----------------------------------------------------------------
           r |   2.155775    .630766                      1.214919    3.825248
           s |   13.59472   4.417661                      7.190656    25.70228
------------------------------------------------------------------------------
LR test vs. pooled: chibar2(01) = 1471.61              Prob >= chibar2 = 0.000

.                                         xtnbreg govexp $d age male,i(id) 
warning: existing panel variable is not id

Fitting negative binomial (constant dispersion) model:

Iteration 0:  Log likelihood = -32876.746  
Iteration 1:  Log likelihood = -32876.741  
Iteration 2:  Log likelihood = -32876.741  

Iteration 0:  Log likelihood = -24973.162  
Iteration 1:  Log likelihood = -18211.932  
Iteration 2:  Log likelihood =  -17374.05  
Iteration 3:  Log likelihood = -17316.211  
Iteration 4:  Log likelihood = -17316.164  
Iteration 5:  Log likelihood = -17316.164  

Iteration 0:  Log likelihood = -17316.164  
Iteration 1:  Log likelihood = -17026.932  
Iteration 2:  Log likelihood = -17009.232  
Iteration 3:  Log likelihood =  -17009.17  
Iteration 4:  Log likelihood =  -17009.17  

Fitting full model:

Iteration 0:  Log likelihood = -20264.952  
Iteration 1:  Log likelihood = -18027.575  
Iteration 2:  Log likelihood = -16674.547  (not concave)
Iteration 3:  Log likelihood = -16423.035  
Iteration 4:  Log likelihood = -16412.194  
Iteration 5:  Log likelihood = -16411.909  
Iteration 6:  Log likelihood = -16411.908  

Random-effects negative binomial regression          Number of obs    =  6,911
Group variable: id                                   Number of groups =     22

Random effects u_i ~ Beta                            Obs per group:
                                                                  min =     89
                                                                  avg =  314.1
                                                                  max =    773

                                                     Wald chi2(3)     = 629.76
Log likelihood = -16411.908                          Prob > chi2      = 0.0000

------------------------------------------------------------------------------
      govexp | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -1.141888   .0943588   -12.10   0.000    -1.326828    -.956948
         age |   .0254958   .0011189    22.79   0.000     .0233028    .0276888
        male |   .0918244   .0311539     2.95   0.003     .0307639    .1528849
       _cons |  -1.593189   .0619523   -25.72   0.000    -1.714613   -1.471765
-------------+----------------------------------------------------------------
       /ln_r |   .7618063   .2864288                      .2004162    1.323196
       /ln_s |   2.532109   .3181747                      1.908498     3.15572
-------------+----------------------------------------------------------------
           r |   2.142142   .6135712                      1.221911    3.755406
           s |   12.58001   4.002641                      6.742956    23.46993
------------------------------------------------------------------------------
LR test vs. pooled: chibar2(01) = 1194.52              Prob >= chibar2 = 0.000

.                                         xi:xtnbreg govexp $d age male i.education
> ,i(id) 
i.education       _Ieducation_1-5     (_Ieducation_1 for education==-1 omitted)

Fitting negative binomial (constant dispersion) model:

Iteration 0:  Log likelihood = -32232.557  
Iteration 1:  Log likelihood = -32232.533  
Iteration 2:  Log likelihood = -32232.533  

Iteration 0:  Log likelihood = -24973.162  
Iteration 1:  Log likelihood = -18211.932  
Iteration 2:  Log likelihood =  -17374.05  
Iteration 3:  Log likelihood = -17316.211  
Iteration 4:  Log likelihood = -17316.164  
Iteration 5:  Log likelihood = -17316.164  

Iteration 0:  Log likelihood = -17316.164  
Iteration 1:  Log likelihood = -16988.143  
Iteration 2:  Log likelihood = -16912.658  
Iteration 3:  Log likelihood = -16911.045  
Iteration 4:  Log likelihood =  -16911.04  
Iteration 5:  Log likelihood =  -16911.04  

Fitting full model:

Iteration 0:  Log likelihood =  -20425.22  
Iteration 1:  Log likelihood = -17066.525  
Iteration 2:  Log likelihood = -16983.892  (not concave)
Iteration 3:  Log likelihood = -16420.394  
Iteration 4:  Log likelihood =  -16383.69  
Iteration 5:  Log likelihood = -16383.399  
Iteration 6:  Log likelihood = -16383.397  

Random-effects negative binomial regression          Number of obs    =  6,911
Group variable: id                                   Number of groups =     22

Random effects u_i ~ Beta                            Obs per group:
                                                                  min =     89
                                                                  avg =  314.1
                                                                  max =    773

                                                     Wald chi2(7)     = 685.06
Log likelihood = -16383.397                          Prob > chi2      = 0.0000

-------------------------------------------------------------------------------
       govexp | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
      v2paind |    -1.0922   .0965046   -11.32   0.000    -1.281346   -.9030547
          age |   .0257973   .0011256    22.92   0.000     .0235912    .0280034
         male |   .1003433   .0311303     3.22   0.001     .0393289    .1613576
_Ieducation_2 |   .3120664   .0789059     3.95   0.000     .1574136    .4667192
_Ieducation_3 |   .0474205   .1005758     0.47   0.637    -.1497045    .2445454
_Ieducation_4 |  -.1876741   .0601624    -3.12   0.002    -.3055902   -.0697579
_Ieducation_5 |   .0778739   .0497433     1.57   0.117    -.0196211     .175369
        _cons |  -1.648862    .069933   -23.58   0.000    -1.785928   -1.511796
--------------+----------------------------------------------------------------
        /ln_r |   .8023405   .2876597                      .2385379    1.366143
        /ln_s |   2.587071   .3187186                      1.962394    3.211748
--------------+----------------------------------------------------------------
            r |   2.230756   .6416985                      1.269392    3.920202
            s |   13.29079   4.236021                      7.116344    24.82244
-------------------------------------------------------------------------------
LR test vs. pooled: chibar2(01) = 1055.29              Prob >= chibar2 = 0.000

.                                         xi:xtnbreg govexp $d age male i.education
>  v2paseat opposition,i(id) 
i.education       _Ieducation_1-5     (_Ieducation_1 for education==-1 omitted)

Fitting negative binomial (constant dispersion) model:

Iteration 0:  Log likelihood = -31746.578  
Iteration 1:  Log likelihood = -31746.551  
Iteration 2:  Log likelihood = -31746.551  

Iteration 0:  Log likelihood = -24973.162  
Iteration 1:  Log likelihood = -18211.932  
Iteration 2:  Log likelihood =  -17374.05  
Iteration 3:  Log likelihood = -17316.211  
Iteration 4:  Log likelihood = -17316.164  
Iteration 5:  Log likelihood = -17316.164  

Iteration 0:  Log likelihood = -17316.164  
Iteration 1:  Log likelihood = -16902.346  
Iteration 2:  Log likelihood = -16793.771  
Iteration 3:  Log likelihood = -16791.699  
Iteration 4:  Log likelihood = -16791.694  
Iteration 5:  Log likelihood = -16791.694  

Fitting full model:

Iteration 0:  Log likelihood = -20005.041  
Iteration 1:  Log likelihood = -17343.888  
Iteration 2:  Log likelihood = -17316.421  (not concave)
Iteration 3:  Log likelihood = -16277.221  
Iteration 4:  Log likelihood = -16221.961  
Iteration 5:  Log likelihood = -16217.556  
Iteration 6:  Log likelihood = -16217.443  
Iteration 7:  Log likelihood = -16217.443  

Random-effects negative binomial regression         Number of obs    =   6,911
Group variable: id                                  Number of groups =      22

Random effects u_i ~ Beta                           Obs per group:
                                                                 min =      89
                                                                 avg =   314.1
                                                                 max =     773

                                                    Wald chi2(9)     = 1048.60
Log likelihood = -16217.443                         Prob > chi2      =  0.0000

-------------------------------------------------------------------------------
       govexp | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
      v2paind |  -.8924737   .1001803    -8.91   0.000    -1.088823   -.6961241
          age |    .026752   .0011216    23.85   0.000     .0245537    .0289504
         male |   .1182757    .030786     3.84   0.000     .0579363    .1786152
_Ieducation_2 |   .4057189   .0799167     5.08   0.000      .249085    .5623528
_Ieducation_3 |    .116063   .0996751     1.16   0.244    -.0792966    .3114226
_Ieducation_4 |  -.1095063   .0596884    -1.83   0.067    -.2264935    .0074809
_Ieducation_5 |    .077993   .0497141     1.57   0.117    -.0194449    .1754308
v2paseatshare |    .011467   .0010949    10.47   0.000     .0093209     .013613
   opposition |  -.3663508   .0332001   -11.03   0.000    -.4314218   -.3012799
        _cons |  -1.794619     .07627   -23.53   0.000    -1.944105   -1.645132
--------------+----------------------------------------------------------------
        /ln_r |   .8186706   .2875754                      .2550331    1.382308
        /ln_s |    2.53986   .3175692                      1.917436    3.162284
--------------+----------------------------------------------------------------
            r |   2.267483   .6520724                      1.290504    3.984086
            s |    12.6779   4.026109                      6.803491     23.6245
-------------------------------------------------------------------------------
LR test vs. pooled: chibar2(01) = 1148.50              Prob >= chibar2 = 0.000

.                                         xi:xtnbreg govexp $d age male i.education
>  v2paseat opposition incentive,i(id) 
i.education       _Ieducation_1-5     (_Ieducation_1 for education==-1 omitted)

Fitting negative binomial (constant dispersion) model:

Iteration 0:  Log likelihood = -31238.201  
Iteration 1:  Log likelihood = -31238.101  
Iteration 2:  Log likelihood = -31238.101  

Iteration 0:  Log likelihood = -24973.162  
Iteration 1:  Log likelihood = -18211.932  
Iteration 2:  Log likelihood =  -17374.05  
Iteration 3:  Log likelihood = -17316.211  
Iteration 4:  Log likelihood = -17316.164  
Iteration 5:  Log likelihood = -17316.164  

Iteration 0:  Log likelihood = -17316.164  
Iteration 1:  Log likelihood = -16774.836  
Iteration 2:  Log likelihood = -16621.893  
Iteration 3:  Log likelihood =  -16618.99  
Iteration 4:  Log likelihood = -16618.988  
Iteration 5:  Log likelihood = -16618.988  

Fitting full model:

Iteration 0:  Log likelihood = -19519.663  
Iteration 1:  Log likelihood = -17709.628  
Iteration 2:  Log likelihood = -17660.082  (not concave)
Iteration 3:  Log likelihood =  -16886.94  (not concave)
Iteration 4:  Log likelihood = -16064.177  
Iteration 5:  Log likelihood = -15928.557  
Iteration 6:  Log likelihood = -15918.749  
Iteration 7:  Log likelihood = -15918.441  
Iteration 8:  Log likelihood =  -15918.44  

Random-effects negative binomial regression         Number of obs    =   6,911
Group variable: id                                  Number of groups =      22

Random effects u_i ~ Beta                           Obs per group:
                                                                 min =      89
                                                                 avg =   314.1
                                                                 max =     773

                                                    Wald chi2(10)    = 1655.12
Log likelihood = -15918.44                          Prob > chi2      =  0.0000

-------------------------------------------------------------------------------
       govexp | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
      v2paind |  -.6049246    .097302    -6.22   0.000     -.795633   -.4142161
          age |   .0294342   .0010971    26.83   0.000      .027284    .0315844
         male |    .132664   .0298679     4.44   0.000      .074124     .191204
_Ieducation_2 |   .0549328   .0777541     0.71   0.480    -.0974624     .207328
_Ieducation_3 |  -.0968449   .0960266    -1.01   0.313    -.2850536    .0913638
_Ieducation_4 |  -.1992404   .0577938    -3.45   0.001    -.3125142   -.0859666
_Ieducation_5 |  -.1257543   .0497296    -2.53   0.011    -.2232225   -.0282861
v2paseatshare |    .017403   .0011397    15.27   0.000     .0151693    .0196367
   opposition |   -.233364   .0317541    -7.35   0.000     -.295601    -.171127
    incentive |  -.4850347   .0206379   -23.50   0.000    -.5254843   -.4445851
        _cons |  -.9664614   .0823423   -11.74   0.000    -1.127849   -.8050734
--------------+----------------------------------------------------------------
        /ln_r |   .4864178   .2805698                     -.0634889    1.036325
        /ln_s |   1.985529   .3182066                      1.361855    2.609202
--------------+----------------------------------------------------------------
            r |   1.626479    .456341                      .9384845    2.818837
            s |   7.282895   2.317465                      3.903428     13.5882
-------------------------------------------------------------------------------
LR test vs. pooled: chibar2(01) = 1401.10              Prob >= chibar2 = 0.000

.                                         predict cnt2 if e(sample)==1,nu0
(5,419 missing values generated)

.                                         
.                                         * Drop Fidez outlier *
.                                         xi:xtnbreg govexp $d if v2paid~=1691,i(id
> ) 

Fitting negative binomial (constant dispersion) model:

Iteration 0:  Log likelihood = -48133.867  
Iteration 1:  Log likelihood = -48133.787  
Iteration 2:  Log likelihood = -48133.787  

Iteration 0:  Log likelihood = -34116.151  
Iteration 1:  Log likelihood = -25768.503  
Iteration 2:  Log likelihood =  -24133.14  
Iteration 3:  Log likelihood = -23906.843  
Iteration 4:  Log likelihood = -23906.485  
Iteration 5:  Log likelihood = -23906.485  

Iteration 0:  Log likelihood = -23906.485  
Iteration 1:  Log likelihood = -23639.943  
Iteration 2:  Log likelihood = -23631.123  
Iteration 3:  Log likelihood = -23631.113  
Iteration 4:  Log likelihood = -23631.113  

Fitting full model:

Iteration 0:  Log likelihood = -29229.974  
Iteration 1:  Log likelihood = -25785.595  (not concave)
Iteration 2:  Log likelihood = -24270.052  
Iteration 3:  Log likelihood = -22997.807  
Iteration 4:  Log likelihood = -22927.438  
Iteration 5:  Log likelihood = -22903.472  
Iteration 6:  Log likelihood = -22902.853  
Iteration 7:  Log likelihood = -22902.826  
Iteration 8:  Log likelihood = -22902.826  

Random-effects negative binomial regression          Number of obs    =  9,294
Group variable: id                                   Number of groups =     26

Random effects u_i ~ Beta                            Obs per group:
                                                                  min =    101
                                                                  avg =  357.5
                                                                  max =  1,182

                                                     Wald chi2(1)     = 269.06
Log likelihood = -22902.826                          Prob > chi2      = 0.0000

------------------------------------------------------------------------------
      govexp | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -1.453716    .088624   -16.40   0.000    -1.627416   -1.280016
       _cons |  -.2924576   .0290587   -10.06   0.000    -.3494117   -.2355036
-------------+----------------------------------------------------------------
       /ln_r |   .7555661    .263289                      .2395292    1.271603
       /ln_s |   2.582844   .2929045                      2.008761    3.156926
-------------+----------------------------------------------------------------
           r |   2.128816   .5604938                      1.270651    3.566565
           s |   13.23472    3.87651                      7.454079    23.49825
------------------------------------------------------------------------------
LR test vs. pooled: chibar2(01) = 1456.57              Prob >= chibar2 = 0.000

.                                         xi:xtnbreg govexp $d age male i.education
>  v2pasea opposition incentive if v2paid~=1691,i(id) 
i.education       _Ieducation_1-5     (_Ieducation_1 for education==-1 omitted)

Fitting negative binomial (constant dispersion) model:

Iteration 0:  Log likelihood = -31105.551  
Iteration 1:  Log likelihood = -31105.421  
Iteration 2:  Log likelihood = -31105.421  

Iteration 0:  Log likelihood = -24879.301  
Iteration 1:  Log likelihood = -18091.739  
Iteration 2:  Log likelihood = -17289.545  
Iteration 3:  Log likelihood = -17237.991  
Iteration 4:  Log likelihood = -17237.952  
Iteration 5:  Log likelihood = -17237.952  

Iteration 0:  Log likelihood = -17237.952  
Iteration 1:  Log likelihood = -16696.796  
Iteration 2:  Log likelihood =  -16543.58  
Iteration 3:  Log likelihood = -16540.663  
Iteration 4:  Log likelihood = -16540.661  
Iteration 5:  Log likelihood = -16540.661  

Fitting full model:

Iteration 0:  Log likelihood = -19374.677  
Iteration 1:  Log likelihood = -17576.413  
Iteration 2:  Log likelihood =  -17260.92  (not concave)
Iteration 3:  Log likelihood = -16129.398  
Iteration 4:  Log likelihood = -15851.663  
Iteration 5:  Log likelihood =  -15832.63  
Iteration 6:  Log likelihood = -15832.282  
Iteration 7:  Log likelihood = -15832.282  

Random-effects negative binomial regression         Number of obs    =   6,890
Group variable: id                                  Number of groups =      22

Random effects u_i ~ Beta                           Obs per group:
                                                                 min =      89
                                                                 avg =   313.2
                                                                 max =     773

                                                    Wald chi2(10)    = 1638.59
Log likelihood = -15832.282                         Prob > chi2      =  0.0000

-------------------------------------------------------------------------------
       govexp | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
      v2paind |  -.7304287   .0992209    -7.36   0.000     -.924898   -.5359593
          age |   .0300591   .0011064    27.17   0.000     .0278906    .0322277
         male |   .1369886   .0298641     4.59   0.000     .0784559    .1955212
_Ieducation_2 |   .0573632   .0775315     0.74   0.459    -.0945958    .2093222
_Ieducation_3 |  -.0880965   .0958047    -0.92   0.358    -.2758702    .0996772
_Ieducation_4 |  -.1806078   .0580506    -3.11   0.002    -.2943849   -.0668306
_Ieducation_5 |  -.1104002   .0497809    -2.22   0.027     -.207969   -.0128314
v2paseatshare |   .0164824   .0011493    14.34   0.000     .0142298    .0187349
   opposition |  -.2186265   .0317069    -6.90   0.000    -.2807709   -.1564822
    incentive |  -.4800549   .0206772   -23.22   0.000    -.5205814   -.4395285
        _cons |  -.9693774   .0825595   -11.74   0.000    -1.131191   -.8075638
--------------+----------------------------------------------------------------
        /ln_r |   .4864903   .2804892                     -.0632583    1.036239
        /ln_s |    1.96742   .3178942                      1.344359    2.590481
--------------+----------------------------------------------------------------
            r |   1.626597   .4562429                      .9387009    2.818596
            s |   7.152202   2.273643                      3.835728    13.33619
-------------------------------------------------------------------------------
LR test vs. pooled: chibar2(01) = 1416.76              Prob >= chibar2 = 0.000

. 
.                                         * Within estimators *
.                                         xi:xtnbreg govexp $d age male i.education
>  v2paseat opposition incentive,i(id) fe
i.education       _Ieducation_1-5     (_Ieducation_1 for education==-1 omitted)

Iteration 0:  Log likelihood =  -19300.49  
Iteration 1:  Log likelihood = -16499.949  
Iteration 2:  Log likelihood = -15832.788  
Iteration 3:  Log likelihood = -15736.709  
Iteration 4:  Log likelihood = -15735.248  
Iteration 5:  Log likelihood = -15735.248  

Conditional FE negative binomial regression         Number of obs    =   6,911
Group variable: id                                  Number of groups =      22

                                                    Obs per group:
                                                                 min =      89
                                                                 avg =   314.1
                                                                 max =     773

                                                    Wald chi2(10)    = 1663.05
Log likelihood = -15735.248                         Prob > chi2      =  0.0000

-------------------------------------------------------------------------------
       govexp | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
      v2paind |  -.5945686   .0972936    -6.11   0.000    -.7852606   -.4038766
          age |   .0294365   .0010973    26.83   0.000     .0272858    .0315871
         male |   .1323704   .0298548     4.43   0.000     .0738561    .1908847
_Ieducation_2 |   .0552695   .0778041     0.71   0.477    -.0972238    .2077628
_Ieducation_3 |  -.0907952   .0959482    -0.95   0.344    -.2788503    .0972599
_Ieducation_4 |  -.1934014   .0578894    -3.34   0.001    -.3068625   -.0799404
_Ieducation_5 |  -.1215567   .0498646    -2.44   0.015    -.2192895    -.023824
v2paseatshare |   .0174065   .0011398    15.27   0.000     .0151726    .0196405
   opposition |  -.2331764   .0317414    -7.35   0.000    -.2953884   -.1709645
    incentive |  -.4919224   .0207299   -23.73   0.000    -.5325522   -.4512926
        _cons |  -.9578057    .082514   -11.61   0.000     -1.11953   -.7960813
-------------------------------------------------------------------------------

.                                         xi:nbreg govexp i.id $d age male i.educat
> ion v2paseat opposition,
i.id              _Iid_1-29           (naturally coded; _Iid_1 omitted)
i.education       _Ieducation_1-5     (_Ieducation_1 for education==-1 omitted)
note: _Iid_2 omitted because of collinearity.
note: _Iid_10 omitted because of collinearity.
note: _Iid_12 omitted because of collinearity.
note: _Iid_15 omitted because of collinearity.
note: _Iid_18 omitted because of collinearity.
note: _Iid_21 omitted because of collinearity.
note: _Iid_22 omitted because of collinearity.

Fitting Poisson model:

Iteration 0:  Log likelihood = -25774.025  
Iteration 1:  Log likelihood = -25733.344  
Iteration 2:  Log likelihood = -25733.264  
Iteration 3:  Log likelihood = -25733.264  

Fitting constant-only model:

Iteration 0:  Log likelihood = -18540.576  
Iteration 1:  Log likelihood = -17317.868  
Iteration 2:  Log likelihood = -17316.164  
Iteration 3:  Log likelihood = -17316.164  

Fitting full model:

Iteration 0:  Log likelihood =  -16554.48  
Iteration 1:  Log likelihood = -16132.102  
Iteration 2:  Log likelihood = -16115.179  
Iteration 3:  Log likelihood = -16115.129  
Iteration 4:  Log likelihood = -16115.129  

Negative binomial regression                           Number of obs =   6,911
                                                       LR chi2(30)   = 2402.07
Dispersion: mean                                       Prob > chi2   =  0.0000
Log likelihood = -16115.129                            Pseudo R2     =  0.0694

-------------------------------------------------------------------------------
       govexp | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
       _Iid_2 |          0  (omitted)
       _Iid_3 |   .0376727   .1790293     0.21   0.833    -.3132182    .3885637
       _Iid_4 |   -.238457   .1498777    -1.59   0.112    -.5322118    .0552979
       _Iid_5 |   1.495449   .1226477    12.19   0.000     1.255064    1.735834
       _Iid_6 |   1.619458   .1180932    13.71   0.000     1.387999    1.850916
       _Iid_7 |    1.75817   .1610923    10.91   0.000     1.442435    2.073905
       _Iid_8 |   .7486668   .1720211     4.35   0.000     .4115117    1.085822
       _Iid_9 |   .7395364   .1804045     4.10   0.000     .3859501    1.093123
      _Iid_10 |          0  (omitted)
      _Iid_11 |   1.543551   .1550614     9.95   0.000     1.239636    1.847466
      _Iid_12 |          0  (omitted)
      _Iid_13 |   2.386964   .1290078    18.50   0.000     2.134114    2.639815
      _Iid_14 |   1.421773   .1878255     7.57   0.000     1.053641    1.789904
      _Iid_15 |          0  (omitted)
      _Iid_16 |   1.353675   .1697187     7.98   0.000     1.021032    1.686318
      _Iid_17 |   1.570845   .1691507     9.29   0.000     1.239316    1.902375
      _Iid_18 |          0  (omitted)
      _Iid_19 |  -.4889378   .1767141    -2.77   0.006     -.835291   -.1425847
      _Iid_20 |   .0400664   .1810178     0.22   0.825    -.3147219    .3948547
      _Iid_21 |          0  (omitted)
      _Iid_22 |          0  (omitted)
      _Iid_23 |   1.417814   .1816114     7.81   0.000     1.061862    1.773766
      _Iid_24 |   1.211799   .1657231     7.31   0.000     .8869876     1.53661
      _Iid_25 |   1.617278   .1795879     9.01   0.000     1.265292    1.969263
      _Iid_26 |   2.032173   .1521432    13.36   0.000     1.733978    2.330368
      _Iid_27 |   .1988005   .2100594     0.95   0.344    -.2129083    .6105093
      _Iid_28 |   1.379783   .1570463     8.79   0.000     1.071978    1.687588
      _Iid_29 |   .1231413   .1518447     0.81   0.417    -.1744687    .4207514
      v2paind |  -.4225463   .1194632    -3.54   0.000    -.6566898   -.1884028
          age |   .0455136   .0015552    29.26   0.000     .0424654    .0485618
         male |    .223079   .0380407     5.86   0.000     .1485207    .2976373
_Ieducation_2 |   .0160069   .1383089     0.12   0.908    -.2550737    .2870874
_Ieducation_3 |   .0144194   .1381731     0.10   0.917    -.2563949    .2852336
_Ieducation_4 |   .0625807   .1039524     0.60   0.547    -.1411621    .2663236
_Ieducation_5 |   .0873244   .0968723     0.90   0.367    -.1025418    .2771905
v2paseatshare |   .0246908   .0015376    16.06   0.000     .0216772    .0277044
   opposition |  -.1062207      .0412    -2.58   0.010    -.1869712   -.0254701
        _cons |  -2.489194   .1481107   -16.81   0.000    -2.779486   -2.198903
--------------+----------------------------------------------------------------
     /lnalpha |   .4799826   .0253372                      .4303226    .5296425
--------------+----------------------------------------------------------------
        alpha |   1.616046    .040946                      1.537754    1.698325
-------------------------------------------------------------------------------
LR test of alpha=0: chibar2(01) = 1.9e+04              Prob >= chibar2 = 0.000

.                                         predict cnt3 if e(sample)==1,n
(5,419 missing values generated)

.                                         
.                                         * Multi-level *
.                                         xi:meglm govexp i.year $d incentive oppos
> ition v2paseats || countryid:, family(nbinomial)
i.year            _Iyear_2005-2013    (naturally coded; _Iyear_2005 omitted)

Fitting fixed-effects model:

Iteration 0:  Log likelihood = -25570.562  
Iteration 1:  Log likelihood = -24153.274  
Iteration 2:  Log likelihood = -24059.933  
Iteration 3:  Log likelihood = -24058.714  
Iteration 4:  Log likelihood = -24058.714  

Refining starting values:

Grid node 0:  Log likelihood = -23541.634

Fitting full model:

Iteration 0:  Log likelihood = -23541.634  (not concave)
Iteration 1:  Log likelihood = -23539.771  (backed up)
Iteration 2:  Log likelihood = -23469.653  
Iteration 3:  Log likelihood = -23401.983  
Iteration 4:  Log likelihood = -23400.468  
Iteration 5:  Log likelihood = -23400.461  
Iteration 6:  Log likelihood = -23400.461  

Mixed-effects GLM                               Number of obs     =      9,441
Family: Negative binomial
Link:   Log
Overdispersion: mean
Group variable: countryid                       Number of groups  =         21

                                                Obs per group:
                                                              min =        101
                                                              avg =      449.6
                                                              max =      1,182

Integration method: mvaghermite                 Integration pts.  =          7

                                                Wald chi2(12)     =     373.68
Log likelihood = -23400.461                     Prob > chi2       =     0.0000
-------------------------------------------------------------------------------
       govexp | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
  _Iyear_2006 |   .6398823   .5731051     1.12   0.264     -.483383    1.763148
  _Iyear_2007 |   .2146612   .1416723     1.52   0.130    -.0630113    .4923337
  _Iyear_2008 |   .2677376   .8742507     0.31   0.759    -1.445762    1.981238
  _Iyear_2009 |   .0624092     .08906     0.70   0.483    -.1121451    .2369635
  _Iyear_2010 |   .7779677   .1806528     4.31   0.000     .4238947    1.132041
  _Iyear_2011 |   .1410265   .1417059     1.00   0.320     -.136712     .418765
  _Iyear_2012 |   .0593664   .8291007     0.07   0.943    -1.565641    1.684374
  _Iyear_2013 |   .9278433   .7992108     1.16   0.246     -.638581    2.494268
      v2paind |  -.1963358   .1066703    -1.84   0.066    -.4054058    .0127343
    incentive |  -.1763941   .1495035    -1.18   0.238    -.4694156    .1166273
   opposition |  -.1517734   .0350808    -4.33   0.000    -.2205304   -.0830163
v2paseatshare |   .0219763    .001346    16.33   0.000     .0193382    .0246144
        _cons |   1.082217    .390844     2.77   0.006     .3161765    1.848257
--------------+----------------------------------------------------------------
     /lnalpha |   .6010684   .0201241                      .5616259    .6405109
--------------+----------------------------------------------------------------
countryid     |
    var(_cons)|   .5293389   .1663186                      .2859471    .9799003
-------------------------------------------------------------------------------
LR test vs. nbinomial model: chibar2(01) = 1316.51    Prob >= chibar2 = 0.0000

.                                         xi:meglm govexp i.year $d age male i.educ
> ation incentive opposition v2paseats || countryid:, family(nbinomial)
i.year            _Iyear_2005-2013    (naturally coded; _Iyear_2005 omitted)
i.education       _Ieducation_1-5     (_Ieducation_1 for education==-1 omitted)
note: _Iyear_2008 omitted because of collinearity.

Fitting fixed-effects model:

Iteration 0:  Log likelihood = -17455.025  
Iteration 1:  Log likelihood = -16693.166  
Iteration 2:  Log likelihood = -16633.987  
Iteration 3:  Log likelihood = -16633.179  
Iteration 4:  Log likelihood = -16633.179  

Refining starting values:

Grid node 0:  Log likelihood = -16293.924

Fitting full model:

Iteration 0:  Log likelihood = -16293.924  (not concave)
Iteration 1:  Log likelihood = -16292.612  (backed up)
Iteration 2:  Log likelihood = -16282.547  
Iteration 3:  Log likelihood = -16184.839  
Iteration 4:  Log likelihood = -16166.663  
Iteration 5:  Log likelihood = -16166.535  
Iteration 6:  Log likelihood = -16166.535  

Mixed-effects GLM                               Number of obs     =      6,911
Family: Negative binomial
Link:   Log
Overdispersion: mean
Group variable: countryid                       Number of groups  =         18

                                                Obs per group:
                                                              min =         89
                                                              avg =      383.9
                                                              max =      1,006

Integration method: mvaghermite                 Integration pts.  =          7

                                                Wald chi2(17)     =    1165.16
Log likelihood = -16166.535                     Prob > chi2       =     0.0000
-------------------------------------------------------------------------------
       govexp | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
  _Iyear_2006 |   .7057184   .6114053     1.15   0.248     -.492614    1.904051
  _Iyear_2007 |   .3089275   .1506598     2.05   0.040     .0136398    .6042152
  _Iyear_2008 |          0  (omitted)
  _Iyear_2009 |   .1065597   .0943762     1.13   0.259    -.0784142    .2915336
  _Iyear_2010 |   .3810372   .5686943     0.67   0.503    -.7335833    1.495658
  _Iyear_2011 |   .1668843   .1460576     1.14   0.253    -.1193833    .4531519
  _Iyear_2012 |   .0926403   .8804245     0.11   0.916     -1.63296    1.818241
  _Iyear_2013 |   1.023615   .8795382     1.16   0.245    -.7002486    2.747478
      v2paind |  -.4248697   .1193769    -3.56   0.000    -.6588441   -.1908954
          age |   .0453747   .0015555    29.17   0.000     .0423259    .0484235
         male |   .2203342   .0380446     5.79   0.000     .1457681    .2949002
_Ieducation_2 |  -.0060753   .1376793    -0.04   0.965    -.2759217    .2637712
_Ieducation_3 |  -.0146794   .1379224    -0.11   0.915    -.2850024    .2556435
_Ieducation_4 |   .0338352   .1030898     0.33   0.743    -.1682171    .2358875
_Ieducation_5 |   .0566714   .0960006     0.59   0.555    -.1314863    .2448291
    incentive |  -.2029686     .17556    -1.16   0.248      -.54706    .1411227
   opposition |  -.1085967   .0411534    -2.64   0.008    -.1892559   -.0279374
v2paseatshare |   .0246389   .0015376    16.02   0.000     .0216253    .0276524
        _cons |  -1.325065   .4446972    -2.98   0.003    -2.196655   -.4534744
--------------+----------------------------------------------------------------
     /lnalpha |   .4850577   .0253519                      .4353688    .5347465
--------------+----------------------------------------------------------------
countryid     |
    var(_cons)|   .5928116   .2025642                      .3034314    1.158172
-------------------------------------------------------------------------------
LR test vs. nbinomial model: chibar2(01) = 933.29     Prob >= chibar2 = 0.0000

. 
.                                         * Among candidates and non-candidates
.                                         xtnbreg govexp $d age if candidate==0,i(i
> d) 

Fitting negative binomial (constant dispersion) model:

Iteration 0:  Log likelihood = -20019.048  
Iteration 1:  Log likelihood = -20019.034  
Iteration 2:  Log likelihood = -20019.034  

Iteration 0:  Log likelihood = -14989.315  
Iteration 1:  Log likelihood = -14466.153  
Iteration 2:  Log likelihood = -11432.382  
Iteration 3:  Log likelihood = -10633.898  
Iteration 4:  Log likelihood = -10633.567  
Iteration 5:  Log likelihood = -10633.567  

Iteration 0:  Log likelihood = -10633.567  
Iteration 1:  Log likelihood = -10473.936  
Iteration 2:  Log likelihood =  -10465.57  
Iteration 3:  Log likelihood = -10465.544  
Iteration 4:  Log likelihood = -10465.544  

Fitting full model:

Iteration 0:  Log likelihood =  -11947.89  
Iteration 1:  Log likelihood = -11908.892  
Iteration 2:  Log likelihood = -10351.171  (not concave)
Iteration 3:  Log likelihood = -10019.082  
Iteration 4:  Log likelihood =  -9982.845  
Iteration 5:  Log likelihood = -9980.1521  
Iteration 6:  Log likelihood = -9980.1071  
Iteration 7:  Log likelihood =  -9980.107  

Random-effects negative binomial regression          Number of obs    =  4,825
Group variable: id                                   Number of groups =     22

Random effects u_i ~ Beta                            Obs per group:
                                                                  min =     38
                                                                  avg =  219.3
                                                                  max =    559

                                                     Wald chi2(2)     = 359.72
Log likelihood = -9980.107                           Prob > chi2      = 0.0000

------------------------------------------------------------------------------
      govexp | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -1.194569   .1322535    -9.03   0.000    -1.453781   -.9353572
         age |   .0250582   .0014508    17.27   0.000     .0222147    .0279018
       _cons |  -1.574947   .0768139   -20.50   0.000    -1.725499   -1.424394
-------------+----------------------------------------------------------------
       /ln_r |   .3407769   .2888945                      -.225446    .9069998
       /ln_s |   1.635757   .3391023                      .9711291    2.300386
-------------+----------------------------------------------------------------
           r |    1.40604   .4061971                      .7981602     2.47688
           s |   5.133345   1.740729                      2.640925    9.978031
------------------------------------------------------------------------------
LR test vs. pooled: chibar2(01) = 970.87               Prob >= chibar2 = 0.000

.                                         xtnbreg govexp $d age if candidate==1,i(i
> d) 

Fitting negative binomial (constant dispersion) model:

Iteration 0:  Log likelihood = -11411.198  
Iteration 1:  Log likelihood = -11411.197  

Iteration 0:  Log likelihood = -8773.2097  
Iteration 1:  Log likelihood = -7372.4209  
Iteration 2:  Log likelihood = -6703.4547  
Iteration 3:  Log likelihood = -6411.1526  
Iteration 4:  Log likelihood = -6410.8337  
Iteration 5:  Log likelihood = -6410.8337  

Iteration 0:  Log likelihood = -6410.8337  
Iteration 1:  Log likelihood = -6318.9844  
Iteration 2:  Log likelihood = -6314.2493  
Iteration 3:  Log likelihood = -6314.2374  
Iteration 4:  Log likelihood = -6314.2374  

Fitting full model:

Iteration 0:  Log likelihood = -6974.2235  
Iteration 1:  Log likelihood =  -6065.351  
Iteration 2:  Log likelihood = -6040.4834  
Iteration 3:  Log likelihood = -6032.2145  
Iteration 4:  Log likelihood = -6031.8392  
Iteration 5:  Log likelihood = -6031.8374  
Iteration 6:  Log likelihood = -6031.8374  

Random-effects negative binomial regression          Number of obs    =  2,091
Group variable: id                                   Number of groups =     20

Random effects u_i ~ Beta                            Obs per group:
                                                                  min =     26
                                                                  avg =  104.5
                                                                  max =    235

                                                     Wald chi2(2)     = 113.93
Log likelihood = -6031.8374                          Prob > chi2      = 0.0000

------------------------------------------------------------------------------
      govexp | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.8991321   .1303897    -6.90   0.000    -1.154691    -.643573
         age |   .0167897   .0018372     9.14   0.000     .0131888    .0203906
       _cons |  -.5192656     .10233    -5.07   0.000    -.7198288   -.3187024
-------------+----------------------------------------------------------------
       /ln_r |   .8294969   .3068114                      .2281576    1.430836
       /ln_s |   2.373875   .3394286                      1.708608    3.039143
-------------+----------------------------------------------------------------
           r |   2.292165   .7032625                      1.256283    4.182195
           s |   10.73893     3.6451                      5.521268    20.88734
------------------------------------------------------------------------------
LR test vs. pooled: chibar2(01) = 564.80               Prob >= chibar2 = 0.000

. 
.                                         * Party experience *
.                                         xtnbreg parexp $d,i(id) 

Fitting negative binomial (constant dispersion) model:

Iteration 0:  Log likelihood = -51620.054  
Iteration 1:  Log likelihood = -51620.051  

Iteration 0:  Log likelihood =  -37102.19  
Iteration 1:  Log likelihood = -28532.683  
Iteration 2:  Log likelihood = -28042.689  
Iteration 3:  Log likelihood = -28038.903  
Iteration 4:  Log likelihood = -28038.903  

Iteration 0:  Log likelihood = -28038.903  
Iteration 1:  Log likelihood = -27887.873  
Iteration 2:  Log likelihood = -27885.335  
Iteration 3:  Log likelihood = -27885.334  

Fitting full model:

Iteration 0:  Log likelihood =  -32604.53  
Iteration 1:  Log likelihood = -29005.104  
Iteration 2:  Log likelihood = -27508.547  (not concave)
Iteration 3:  Log likelihood = -26938.103  
Iteration 4:  Log likelihood = -26907.374  
Iteration 5:  Log likelihood = -26905.254  
Iteration 6:  Log likelihood = -26905.227  
Iteration 7:  Log likelihood = -26905.227  

Random-effects negative binomial regression          Number of obs    =  9,046
Group variable: id                                   Number of groups =     24

Random effects u_i ~ Beta                            Obs per group:
                                                                  min =    115
                                                                  avg =  376.9
                                                                  max =  1,359

                                                     Wald chi2(1)     = 138.66
Log likelihood = -26905.227                          Prob > chi2      = 0.0000

------------------------------------------------------------------------------
      parexp | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.7979537   .0677645   -11.78   0.000    -.9307696   -.6651377
       _cons |   .2422166   .0249439     9.71   0.000     .1933275    .2911057
-------------+----------------------------------------------------------------
       /ln_r |   .6663123   .2732148                      .1308212    1.201803
       /ln_s |   2.250731   .3049748                      1.652991     2.84847
-------------+----------------------------------------------------------------
           r |   1.947044   .5319612                      1.139764     3.32611
           s |   9.494669   2.895635                      5.222577    17.26135
------------------------------------------------------------------------------
LR test vs. pooled: chibar2(01) = 1960.21              Prob >= chibar2 = 0.000

.                                         predict cnt4,nu0
(627 missing values generated)

.                                         xi:xtnbreg parexp $d age male i.education
>  v2paseat opposition incentive,i(id) 
i.education       _Ieducation_1-5     (_Ieducation_1 for education==-1 omitted)

Fitting negative binomial (constant dispersion) model:

Iteration 0:  Log likelihood = -31645.246  
Iteration 1:  Log likelihood =   -31645.2  
Iteration 2:  Log likelihood =   -31645.2  

Iteration 0:  Log likelihood = -25880.791  
Iteration 1:  Log likelihood = -19688.159  
Iteration 2:  Log likelihood = -19614.097  
Iteration 3:  Log likelihood = -19614.015  
Iteration 4:  Log likelihood = -19614.015  

Iteration 0:  Log likelihood = -19614.015  
Iteration 1:  Log likelihood = -19155.992  
Iteration 2:  Log likelihood = -19056.008  
Iteration 3:  Log likelihood = -19055.581  
Iteration 4:  Log likelihood = -19055.581  

Fitting full model:

Iteration 0:  Log likelihood = -21627.942  
Iteration 1:  Log likelihood = -21046.144  (not concave)
Iteration 2:  Log likelihood = -19203.157  
Iteration 3:  Log likelihood = -18741.995  
Iteration 4:  Log likelihood = -18483.771  
Iteration 5:  Log likelihood = -18469.342  
Iteration 6:  Log likelihood = -18468.939  
Iteration 7:  Log likelihood = -18468.938  

Random-effects negative binomial regression          Number of obs    =  6,446
Group variable: id                                   Number of groups =     20

Random effects u_i ~ Beta                            Obs per group:
                                                                  min =    103
                                                                  avg =  322.3
                                                                  max =    788

                                                     Wald chi2(10)    = 892.94
Log likelihood = -18468.938                          Prob > chi2      = 0.0000

-------------------------------------------------------------------------------
       parexp | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
      v2paind |  -.8372337    .079587   -10.52   0.000    -.9932213    -.681246
          age |    .017295   .0008952    19.32   0.000     .0155405    .0190496
         male |   .1524511   .0242047     6.30   0.000     .1050107    .1998915
_Ieducation_2 |   -.028871   .0661328    -0.44   0.662    -.1584889     .100747
_Ieducation_3 |   .1042346   .0776006     1.34   0.179    -.0478599    .2563291
_Ieducation_4 |  -.1242811   .0475543    -2.61   0.009    -.2174858   -.0310764
_Ieducation_5 |  -.1122098    .041996    -2.67   0.008    -.1945204   -.0298991
v2paseatshare |   .0099323   .0009381    10.59   0.000     .0080937    .0117709
   opposition |  -.1504293   .0253485    -5.93   0.000    -.2001113   -.1007472
    incentive |  -.2335064   .0178901   -13.05   0.000    -.2685704   -.1984424
        _cons |  -.0861615   .0680219    -1.27   0.205    -.2194819    .0471589
--------------+----------------------------------------------------------------
        /ln_r |   1.284715   .3085522                      .6799635    1.889466
        /ln_s |   2.866311   .3278473                      2.223743     3.50888
--------------+----------------------------------------------------------------
            r |   3.613637   1.114996                      1.973806    6.615835
            s |   17.57208   5.760961                      9.241854    33.41084
-------------------------------------------------------------------------------
LR test vs. pooled: chibar2(01) = 1173.29              Prob >= chibar2 = 0.000

.                                         predict  cnt5 if e(sample),nu0
(5,884 missing values generated)

.                                         xi:nbreg parexp i.countryid $d age male i
> .education v2paseat opposition incentive,
i.countryid       _Icountryid_1-23    (naturally coded; _Icountryid_1 omitted)
i.education       _Ieducation_1-5     (_Ieducation_1 for education==-1 omitted)
note: _Icountryid_9 omitted because of collinearity.
note: _Icountryid_11 omitted because of collinearity.
note: _Icountryid_12 omitted because of collinearity.
note: _Icountryid_14 omitted because of collinearity.
note: _Icountryid_15 omitted because of collinearity.
note: _Icountryid_23 omitted because of collinearity.
note: incentive omitted because of collinearity.

Fitting Poisson model:

Iteration 0:  Log likelihood = -27777.266  
Iteration 1:  Log likelihood = -27751.825  
Iteration 2:  Log likelihood = -27751.793  
Iteration 3:  Log likelihood = -27751.793  

Fitting constant-only model:

Iteration 0:  Log likelihood = -19719.866  
Iteration 1:  Log likelihood = -19614.077  
Iteration 2:  Log likelihood = -19614.015  
Iteration 3:  Log likelihood = -19614.015  

Fitting full model:

Iteration 0:  Log likelihood = -18762.253  
Iteration 1:  Log likelihood =   -18568.8  
Iteration 2:  Log likelihood = -18451.507  
Iteration 3:  Log likelihood = -18450.619  
Iteration 4:  Log likelihood = -18450.618  

Negative binomial regression                           Number of obs =   6,446
                                                       LR chi2(24)   = 2326.79
Dispersion: mean                                       Prob > chi2   =  0.0000
Log likelihood = -18450.618                            Pseudo R2     =  0.0593

--------------------------------------------------------------------------------
        parexp | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
---------------+----------------------------------------------------------------
 _Icountryid_2 |  -.7920994   .0695106   -11.40   0.000    -.9283377   -.6558612
 _Icountryid_3 |   .8074267   .0792043    10.19   0.000     .6521891    .9626644
 _Icountryid_4 |   .5379936   .1245459     4.32   0.000     .2938881    .7820992
 _Icountryid_5 |   .6694529   .0704909     9.50   0.000     .5312933    .8076125
 _Icountryid_6 |   .5791901   .0736922     7.86   0.000      .434756    .7236242
 _Icountryid_7 |   1.183891   .1002129    11.81   0.000     .9874771    1.380304
 _Icountryid_8 |   .7625847   .1028626     7.41   0.000     .5609778    .9641917
 _Icountryid_9 |          0  (omitted)
_Icountryid_10 |   .6384829   .0683955     9.34   0.000     .5044302    .7725356
_Icountryid_11 |          0  (omitted)
_Icountryid_12 |          0  (omitted)
_Icountryid_13 |  -.5340567   .0953568    -5.60   0.000    -.7209526   -.3471609
_Icountryid_14 |          0  (omitted)
_Icountryid_15 |          0  (omitted)
_Icountryid_16 |   .8064911   .0925424     8.71   0.000     .6251113    .9878709
_Icountryid_17 |   .4539077    .075991     5.97   0.000      .304968    .6028474
_Icountryid_18 |    .341151   .1008356     3.38   0.001     .1435168    .5387851
_Icountryid_19 |   1.004137   .0749802    13.39   0.000     .8571787    1.151096
_Icountryid_20 |   .0443612   .1131653     0.39   0.695    -.1774388    .2661611
_Icountryid_21 |   .3746382   .0674359     5.56   0.000     .2424663    .5068102
_Icountryid_23 |          0  (omitted)
       v2paind |  -.4441695   .0874242    -5.08   0.000    -.6155177   -.2728213
           age |   .0268579   .0011005    24.41   0.000      .024701    .0290149
          male |   .2087109   .0280939     7.43   0.000     .1536479    .2637738
 _Ieducation_2 |   -.062863   .0946868    -0.66   0.507    -.2484457    .1227197
 _Ieducation_3 |   .1867127   .0977387     1.91   0.056    -.0048516    .3782771
 _Ieducation_4 |   .0166185   .0675468     0.25   0.806    -.1157707    .1490078
 _Ieducation_5 |   .0436995   .0617332     0.71   0.479    -.0772954    .1646945
 v2paseatshare |   .0136221   .0011147    12.22   0.000     .0114373     .015807
    opposition |  -.0755543   .0299579    -2.52   0.012    -.1342708   -.0168378
     incentive |          0  (omitted)
         _cons |  -.1210782   .1157911    -1.05   0.296    -.3480246    .1058682
---------------+----------------------------------------------------------------
      /lnalpha |  -.1745086   .0233996                     -.2203709   -.1286463
---------------+----------------------------------------------------------------
         alpha |   .8398696   .0196526                      .8022212    .8792849
--------------------------------------------------------------------------------
LR test of alpha=0: chibar2(01) = 1.9e+04              Prob >= chibar2 = 0.000

.                                         predict  cnt6 if e(sample),n
(5,884 missing values generated)

.                                         
.                                         * Different types of party positions *
.                                         local var = "a b c"

.                                         foreach v of local var {
  2.                                                 desc a8`v'
  3.                                                 qui xtnbreg a8`v' $d age,i(id)
>  
  4.                                                 lincom $d
  5.                                                 qui xi:xtnbreg a8`v' $d age ma
> le i.education v2paseat opposition incentive,i(id) 
  6.                                                 lincom $d
  7.                                                 qui xi:nbreg a8`v' i.id $d age
>  male i.education v2paseat opposition incentive
  8.                                                 lincom $d
  9.                                         }

Variable      Storage   Display    Value
    name         type    format    label      Variable label
-----------------------------------------------------------------------------------
a8a             double  %16.2f     a8a        How many years local party office?

 ( 1)  [a8a]v2paind = 0

------------------------------------------------------------------------------
         a8a | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -1.215138   .0876621   -13.86   0.000    -1.386953   -1.043324
------------------------------------------------------------------------------

 ( 1)  [a8a]v2paind = 0

------------------------------------------------------------------------------
         a8a | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.9872464   .0923168   -10.69   0.000    -1.168184   -.8063088
------------------------------------------------------------------------------

 ( 1)  [a8a]v2paind = 0

------------------------------------------------------------------------------
         a8a | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.3354032   .1018111    -3.29   0.001    -.5349492   -.1358571
------------------------------------------------------------------------------

Variable      Storage   Display    Value
    name         type    format    label      Variable label
-----------------------------------------------------------------------------------
a8b             double  %16.2f     a8b        How many years regional party office?

 ( 1)  [a8b]v2paind = 0

------------------------------------------------------------------------------
         a8b | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.9781175   .1240581    -7.88   0.000    -1.221267   -.7349681
------------------------------------------------------------------------------

 ( 1)  [a8b]v2paind = 0

------------------------------------------------------------------------------
         a8b | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.8657056   .1285119    -6.74   0.000    -1.117584    -.613827
------------------------------------------------------------------------------

 ( 1)  [a8b]v2paind = 0

------------------------------------------------------------------------------
         a8b | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.1059884   .1653046    -0.64   0.521    -.4299795    .2180027
------------------------------------------------------------------------------

Variable      Storage   Display    Value
    name         type    format    label      Variable label
-----------------------------------------------------------------------------------
a8c             double  %16.2f     a8c        How many years national party office?

 ( 1)  [a8c]v2paind = 0

------------------------------------------------------------------------------
         a8c | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.6361939   .1468016    -4.33   0.000    -.9239197   -.3484681
------------------------------------------------------------------------------

 ( 1)  [a8c]v2paind = 0

------------------------------------------------------------------------------
         a8c | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.6887375   .1550127    -4.44   0.000    -.9925569   -.3849181
------------------------------------------------------------------------------

 ( 1)  [a8c]v2paind = 0

------------------------------------------------------------------------------
         a8c | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.6472527   .2291534    -2.82   0.005    -1.096385   -.1981204
------------------------------------------------------------------------------

. 
.                                         * How long a member of the party *
.                                         xtnbreg partytime $d,i(id) 

Fitting negative binomial (constant dispersion) model:

Iteration 0:  Log likelihood = -63677.421  
Iteration 1:  Log likelihood =  -63677.42  

Iteration 0:  Log likelihood = -46445.894  
Iteration 1:  Log likelihood = -36956.567  
Iteration 2:  Log likelihood = -36126.904  
Iteration 3:  Log likelihood = -36113.016  
Iteration 4:  Log likelihood = -36113.014  

Iteration 0:  Log likelihood = -36113.014  
Iteration 1:  Log likelihood = -36028.907  
Iteration 2:  Log likelihood = -36028.013  
Iteration 3:  Log likelihood = -36028.012  

Fitting full model:

Iteration 0:  Log likelihood = -43407.758  
Iteration 1:  Log likelihood = -35555.144  (not concave)
Iteration 2:  Log likelihood = -35456.149  
Iteration 3:  Log likelihood = -35450.774  
Iteration 4:  Log likelihood = -35445.746  
Iteration 5:  Log likelihood = -35444.428  
Iteration 6:  Log likelihood = -35444.416  
Iteration 7:  Log likelihood = -35444.416  

Random-effects negative binomial regression          Number of obs    =  9,849
Group variable: id                                   Number of groups =     26

Random effects u_i ~ Beta                            Obs per group:
                                                                  min =    102
                                                                  avg =  378.8
                                                                  max =  1,408

                                                     Wald chi2(1)     =  30.46
Log likelihood = -35444.416                          Prob > chi2      = 0.0000

------------------------------------------------------------------------------
   partytime | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.2373437   .0430032    -5.52   0.000    -.3216285    -.153059
       _cons |   .7131692   .0196258    36.34   0.000     .6747034    .7516349
-------------+----------------------------------------------------------------
       /ln_r |   2.466696   .2798548                      1.918191    3.015202
       /ln_s |   4.425159   .2855863                       3.86542    4.984898
-------------+----------------------------------------------------------------
           r |   11.78345   3.297656                       6.80863     20.3932
           s |   83.52606    23.8539                       47.7233    146.1886
------------------------------------------------------------------------------
LR test vs. pooled: chibar2(01) = 1167.19              Prob >= chibar2 = 0.000

.                                         xtnbreg partytime $d age,i(id) 

Fitting negative binomial (constant dispersion) model:

Iteration 0:  Log likelihood = -41336.838  
Iteration 1:  Log likelihood = -41336.838  

Iteration 0:  Log likelihood = -33124.261  
Iteration 1:  Log likelihood = -26187.629  
Iteration 2:  Log likelihood = -25682.312  
Iteration 3:  Log likelihood = -25675.686  
Iteration 4:  Log likelihood = -25675.686  

Iteration 0:  Log likelihood = -25675.686  
Iteration 1:  Log likelihood =  -25358.39  
Iteration 2:  Log likelihood = -25333.376  
Iteration 3:  Log likelihood =  -25333.28  
Iteration 4:  Log likelihood =  -25333.28  

Fitting full model:

Iteration 0:  Log likelihood = -28489.692  
Iteration 1:  Log likelihood = -27876.892  (not concave)
Iteration 2:  Log likelihood =   -26660.5  
Iteration 3:  Log likelihood = -25945.317  
Iteration 4:  Log likelihood = -25018.564  (not concave)
Iteration 5:  Log likelihood = -24653.703  
Iteration 6:  Log likelihood = -24602.118  
Iteration 7:  Log likelihood = -24601.902  
Iteration 8:  Log likelihood = -24601.902  

Random-effects negative binomial regression         Number of obs    =   7,067
Group variable: id                                  Number of groups =      22

Random effects u_i ~ Beta                           Obs per group:
                                                                 min =      95
                                                                 avg =   321.2
                                                                 max =     800

                                                    Wald chi2(2)     = 1006.31
Log likelihood = -24601.902                         Prob > chi2      =  0.0000

------------------------------------------------------------------------------
   partytime | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.6002278   .0474842   -12.64   0.000    -.6932952   -.5071604
         age |   .0186088    .000609    30.56   0.000     .0174153    .0198023
       _cons |   .1284832   .0342879     3.75   0.000     .0612801    .1956863
-------------+----------------------------------------------------------------
       /ln_r |   1.837513   .2983718                      1.252715    2.422311
       /ln_s |   3.509322    .309128                      2.903442    4.115202
-------------+----------------------------------------------------------------
           r |   6.280899   1.874043                      3.499833    11.27188
           s |   33.42559   10.33279                      18.23681    61.26456
------------------------------------------------------------------------------
LR test vs. pooled: chibar2(01) = 1462.76              Prob >= chibar2 = 0.000

.                                         predict cnt7,nu0
(4,525 missing values generated)

.                                         xi:xtnbreg partytime $d age male i.educat
> ion v2paseat opposition incentive,i(id) 
i.education       _Ieducation_1-5     (_Ieducation_1 for education==-1 omitted)

Fitting negative binomial (constant dispersion) model:

Iteration 0:  Log likelihood = -37568.846  
Iteration 1:  Log likelihood = -37568.803  
Iteration 2:  Log likelihood = -37568.803  

Iteration 0:  Log likelihood = -33091.388  
Iteration 1:  Log likelihood = -26162.672  
Iteration 2:  Log likelihood = -25659.833  
Iteration 3:  Log likelihood = -25653.276  
Iteration 4:  Log likelihood = -25653.276  

Iteration 0:  Log likelihood = -25653.276  
Iteration 1:  Log likelihood = -25403.824  
Iteration 2:  Log likelihood = -24775.634  
Iteration 3:  Log likelihood = -24772.318  
Iteration 4:  Log likelihood = -24772.317  

Fitting full model:

Iteration 0:  Log likelihood = -27411.542  
Iteration 1:  Log likelihood = -26679.098  
Iteration 2:  Log likelihood = -24775.137  (not concave)
Iteration 3:  Log likelihood = -24191.019  
Iteration 4:  Log likelihood = -24182.385  
Iteration 5:  Log likelihood = -24182.277  
Iteration 6:  Log likelihood = -24182.277  

Random-effects negative binomial regression         Number of obs    =   7,061
Group variable: id                                  Number of groups =      22

Random effects u_i ~ Beta                           Obs per group:
                                                                 min =      95
                                                                 avg =   321.0
                                                                 max =     800

                                                    Wald chi2(10)    = 2005.36
Log likelihood = -24182.277                         Prob > chi2      =  0.0000

-------------------------------------------------------------------------------
    partytime | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
      v2paind |  -.5855497   .0493579   -11.86   0.000    -.6822895   -.4888099
          age |   .0194122   .0005965    32.54   0.000     .0182431    .0205813
         male |   .1026538   .0163849     6.27   0.000       .07054    .1347677
_Ieducation_2 |   .1379023    .055981     2.46   0.014     .0281815    .2476231
_Ieducation_3 |  -.0049045   .0565921    -0.09   0.931     -.115823    .1060139
_Ieducation_4 |  -.0877474   .0360122    -2.44   0.015    -.1583301   -.0171647
_Ieducation_5 |   .0269876   .0324237     0.83   0.405    -.0365617    .0905368
v2paseatshare |   .0148539   .0006105    24.33   0.000     .0136574    .0160504
   opposition |  -.0562841   .0182298    -3.09   0.002    -.0920139   -.0205544
    incentive |   .0416995    .015497     2.69   0.007     .0113258    .0720731
        _cons |  -.2227142   .0557454    -4.00   0.000    -.3319732   -.1134552
--------------+----------------------------------------------------------------
        /ln_r |   2.013838   .3027563                      1.420447     2.60723
        /ln_s |   3.542568   .3117195                      2.931609    4.153527
--------------+----------------------------------------------------------------
            r |   7.492017   2.268256                      4.138968    13.56143
            s |   34.55555   10.77164                      18.75779    63.65813
-------------------------------------------------------------------------------
LR test vs. pooled: chibar2(01) = 1180.08              Prob >= chibar2 = 0.000

.                                         xi:nbreg partytime i.id $d age male i.edu
> cation v2paseat opposition incentive,
i.id              _Iid_1-29           (naturally coded; _Iid_1 omitted)
i.education       _Ieducation_1-5     (_Ieducation_1 for education==-1 omitted)
note: _Iid_2 omitted because of collinearity.
note: _Iid_10 omitted because of collinearity.
note: _Iid_12 omitted because of collinearity.
note: _Iid_15 omitted because of collinearity.
note: _Iid_18 omitted because of collinearity.
note: _Iid_21 omitted because of collinearity.
note: _Iid_22 omitted because of collinearity.
note: incentive omitted because of collinearity.

Fitting Poisson model:

Iteration 0:  Log likelihood = -33320.844  
Iteration 1:  Log likelihood =  -33317.72  
Iteration 2:  Log likelihood = -33317.719  

Fitting constant-only model:

Iteration 0:  Log likelihood = -25955.411  
Iteration 1:  Log likelihood = -25655.316  
Iteration 2:  Log likelihood = -25653.276  
Iteration 3:  Log likelihood = -25653.276  

Fitting full model:

Iteration 0:  Log likelihood = -24413.935  
Iteration 1:  Log likelihood = -24090.004  
Iteration 2:  Log likelihood = -23978.906  
Iteration 3:  Log likelihood = -23978.347  
Iteration 4:  Log likelihood = -23978.347  

Negative binomial regression                           Number of obs =   7,061
                                                       LR chi2(30)   = 3349.86
Dispersion: mean                                       Prob > chi2   =  0.0000
Log likelihood = -23978.347                            Pseudo R2     =  0.0653

-------------------------------------------------------------------------------
    partytime | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
       _Iid_2 |          0  (omitted)
       _Iid_3 |   .4900004   .0688645     7.12   0.000     .3550284    .6249724
       _Iid_4 |   .3211738   .0646932     4.96   0.000     .1943774    .4479702
       _Iid_5 |   .7108775   .0546735    13.00   0.000     .6037194    .8180355
       _Iid_6 |   .7969195   .0538495    14.80   0.000     .6913764    .9024626
       _Iid_7 |   .7257389   .0807105     8.99   0.000     .5675493    .8839285
       _Iid_8 |   .7739508   .0790228     9.79   0.000     .6190689    .9288327
       _Iid_9 |   .7864116   .0824389     9.54   0.000     .6248344    .9479888
      _Iid_10 |          0  (omitted)
      _Iid_11 |   .4327271   .0695074     6.23   0.000     .2964951     .568959
      _Iid_12 |          0  (omitted)
      _Iid_13 |   .7719594   .0592375    13.03   0.000     .6558559    .8880628
      _Iid_14 |   .7632392   .0863299     8.84   0.000     .5940356    .9324428
      _Iid_15 |          0  (omitted)
      _Iid_16 |   .6182917   .0787186     7.85   0.000     .4640061    .7725772
      _Iid_17 |   .7127218   .0784961     9.08   0.000     .5588723    .8665713
      _Iid_18 |          0  (omitted)
      _Iid_19 |   .2706439    .074561     3.63   0.000     .1245071    .4167807
      _Iid_20 |  -.7355524   .0843005    -8.73   0.000    -.9007782   -.5703265
      _Iid_21 |          0  (omitted)
      _Iid_22 |          0  (omitted)
      _Iid_23 |   .6866111   .0781245     8.79   0.000     .5334898    .8397323
      _Iid_24 |   .3670728   .0748325     4.91   0.000     .2204038    .5137419
      _Iid_25 |   .4053396   .0843328     4.81   0.000     .2400503    .5706289
      _Iid_26 |   .8389682   .0684455    12.26   0.000     .7048175     .973119
      _Iid_27 |   .2487144   .0896419     2.77   0.006     .0730195    .4244094
      _Iid_28 |  -.2893394   .0738755    -3.92   0.000    -.4341327   -.1445461
      _Iid_29 |   .4944256    .068061     7.26   0.000     .3610285    .6278226
      v2paind |  -.5228047   .0561068    -9.32   0.000     -.632772   -.4128375
          age |   .0274188   .0006827    40.16   0.000     .0260809    .0287568
         male |   .1211068   .0176704     6.85   0.000     .0864734    .1557403
_Ieducation_2 |   .0852248    .066054     1.29   0.197    -.0442386    .2146882
_Ieducation_3 |   .0109908   .0633405     0.17   0.862    -.1131543    .1351359
_Ieducation_4 |  -.0418009   .0454357    -0.92   0.358    -.1308532    .0472515
_Ieducation_5 |   .0550295    .042307     1.30   0.193    -.0278908    .1379497
v2paseatshare |   .0165968   .0007128    23.28   0.000     .0151998    .0179939
   opposition |  -.0023677   .0198129    -0.12   0.905    -.0412003     .036465
    incentive |          0  (omitted)
        _cons |   .4770904   .0648744     7.35   0.000      .349939    .6042418
--------------+----------------------------------------------------------------
     /lnalpha |  -.9929811    .021012                     -1.034164   -.9517983
--------------+----------------------------------------------------------------
        alpha |   .3704706   .0077843                      .3555235    .3860462
-------------------------------------------------------------------------------
LR test of alpha=0: chibar2(01) = 1.9e+04              Prob >= chibar2 = 0.000

.                                         predict  cnt8 if e(sample),n
(5,269 missing values generated)

. 
.                                         twoway (lpolyci cnt1 v2paind,bw(.2)) (lpo
> lyci cnt2 v2paind,bw(.2)lcol(gs1) ///
>                                                 legend(lab(2 "Baseline count")lab
> (3 "Adjusted count") ///
>                                                 lab(5 "Within count")pos(7)ring(0
> )col(1)order(2 3 5))xtit(Party personalism) ///
>                                                 ytit(Years of experience)ylab(2(1
> )9)tit(Government experience) ///
>                                                 saving("h1.gph",replace)) (lpolyc
> i cnt3 v2paind,bw(.2)lcol(gs12) )
(file h1.gph not found)
file h1.gph saved

.                                         twoway (lpolyci cnt4 v2paind,bw(.2)) (lpo
> lyci cnt5 v2paind,bw(.2)lcol(gs1) ///
>                                                 legend(lab(2 "Baseline count")lab
> (3 "Adjusted count") ///
>                                                 lab(5 "Within count")pos(7)ring(0
> )col(1)order(2 3 5))xtit(Party personalism) ///
>                                                 ytit(Years of experience)ylab(4(2
> )12)tit(Party experience) ///
>                                                 saving("h2.gph",replace)) (lpolyc
> i cnt6 v2paind,bw(.2)lcol(gs12) )
(file h2.gph not found)
file h2.gph saved

.                                         gr combine h1.gph h2.gph,xsize(8)tit("Eli
> tes' experience, Comparative Candidate Survey")

.                                         gr export "$dir\golden\Ch3-CCS-elite-expe
> rience.pdf",as(pdf)replace 
file
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\golden\C
    > h3-CCS-elite-experience.pdf saved as PDF format

.                                         erase h1.gph

.                                         erase h2.gph

.                                         drop cnt*

. 
.                         *********************************************************
> ************************
.                         **** Comparing experience of candidates from personalist 
> and populist parties ***
.                         *********************************************************
> ************************
.                                 qui centile v2xpa_popul if parexp~=.,centile(50)

.                                 local c = r(c_1)

.                                 gen hipop = v2xpa_popul>`c' if v2xpa_popul~=.
(627 missing values generated)

.                                 qui centile v2paind if parexp~=.,centile(50)

.                                 local c = r(c_1)

.                                 gen hipers = v2paind>`c' if v2paind~=.
(627 missing values generated)

.                                 egen ptag = tag(v2paid) if hipers~=.

.                                 tab hipers hipop 

           |         hipop
    hipers |         0          1 |     Total
-----------+----------------------+----------
         0 |     3,007      2,880 |     5,887 
         1 |     2,937      2,879 |     5,816 
-----------+----------------------+----------
     Total |     5,944      5,759 |    11,703 

.                                 tab hipers hipop if ptag==1

           |         hipop
    hipers |         0          1 |     Total
-----------+----------------------+----------
         0 |        27         19 |        46 
         1 |        32         32 |        64 
-----------+----------------------+----------
     Total |        59         51 |       110 

.                                 gen e = .
(12,330 missing values generated)

.                                 gen hi = . 
(12,330 missing values generated)

.                                 gen lo = .
(12,330 missing values generated)

.                                 gen n = _n

.                                 ttest govexp,by(hipers)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |   4,707    6.262375     .111723    7.665042    6.043346    6.481404
       1 |   4,734    4.118504    .0916106    6.303181    3.938905    4.298104
---------+--------------------------------------------------------------------
Combined |   9,441    5.187374    .0730342    7.096352    5.044212    5.330537
---------+--------------------------------------------------------------------
    diff |            2.143871    .1444004                1.860815    2.426927
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  14.8467
H0: diff = 0                                     Degrees of freedom =     9439

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000

.                                 local  m1=r(mu_1) 

.                                 local se1 = r(sd_1)/(sqrt(r(N_1)))

.                                 local  m2=r(mu_2)

.                                 local se2 = r(sd_2)/(sqrt(r(N_2)))

.                                 replace e=`m1' if _n==1
(1 real change made)

.                                 replace hi = `m1' + 1.95* `se1' if _n==1
(1 real change made)

.                                 replace lo = `m1' - 1.95* `se1'  if _n==1
(1 real change made)

.                                 replace e=`m2' if _n==2
(1 real change made)

.                                 replace hi = `m2' + 1.95*`se2' if _n==2
(1 real change made)

.                                 replace lo = `m2' - 1.95*`se2' if _n==2 
(1 real change made)

.                                 ttest govexp,by(hipop)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |   4,923    5.271379    .1018307    7.144862    5.071746    5.471013
       1 |   4,518    5.095839     .104778    7.042763    4.890423    5.301255
---------+--------------------------------------------------------------------
Combined |   9,441    5.187374    .0730342    7.096352    5.044212    5.330537
---------+--------------------------------------------------------------------
    diff |            .1755404    .1461995               -.1110422    .4621229
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   1.2007
H0: diff = 0                                     Degrees of freedom =     9439

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.8850         Pr(|T| > |t|) = 0.2299          Pr(T > t) = 0.1150

.                                 local  m1=r(mu_1) 

.                                 local se1 = r(sd_1)/(sqrt(r(N_1)))

.                                 local  m2=r(mu_2)

.                                 local se2 = r(sd_2)/(sqrt(r(N_2)))

.                                 replace e=`m1' if _n==4
(1 real change made)

.                                 replace hi = `m1' + 1.95* `se1' if _n==4
(1 real change made)

.                                 replace lo = `m1' - 1.95* `se1'  if _n==4
(1 real change made)

.                                 replace e=`m2' if _n==5
(1 real change made)

.                                 replace hi = `m2' + 1.95*`se2' if _n==5
(1 real change made)

.                                 replace lo = `m2' - 1.95*`se2' if _n==5 
(1 real change made)

.                                 twoway (bar e n if n<=5,barwidth(.5)bcol(gs13)yti
> t("Years of experience")saving(h1.gph,replace)) ///
>                                         (rspike hi lo n if n<=5,ylab(0(2)6)col(gs
> 1)legend(off)xtit("")tit(Government experience) ///
>                                         xlab(1 `""{bf:Low} party" "personalism""'
>  2 `""{bf:High} party" "personalism""' ///
>                                         4 `""{bf:Low} party" "populism""' 5  `""{
> bf:High} party" "populism""')xscale(range(0.5 5.5)))
(file h1.gph not found)
file h1.gph saved

.                                 ttest parexp,by(hipers)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |   4,698    8.764794    .1287254    8.823092    8.512431    9.017156
       1 |   4,348    6.711822    .1193854    7.872195    6.477765    6.945878
---------+--------------------------------------------------------------------
Combined |   9,046    7.778023    .0887559    8.441613    7.604042    7.952005
---------+--------------------------------------------------------------------
    diff |            2.052972    .1763381                1.707309    2.398635
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  11.6422
H0: diff = 0                                     Degrees of freedom =     9044

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000

.                                 local  m1=r(mu_1) 

.                                 local se1 = r(sd_1)/(sqrt(r(N_1)))

.                                 local  m2=r(mu_2)

.                                 local se2 = r(sd_2)/(sqrt(r(N_2)))

.                                 replace e=`m1' if _n==1
(1 real change made)

.                                 replace hi = `m1' + 1.95* `se1' if _n==1
(1 real change made)

.                                 replace lo = `m1' - 1.95* `se1'  if _n==1
(1 real change made)

.                                 replace e=`m2' if _n==2
(1 real change made)

.                                 replace hi = `m2' + 1.95*`se2' if _n==2
(1 real change made)

.                                 replace lo = `m2' - 1.95*`se2' if _n==2 
(1 real change made)

.                                 ttest parexp,by(hipop)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |   4,663    7.853742    .1232578    8.416805    7.612099    8.095386
       1 |   4,383    7.697467    .1279094    8.468144      7.4467    7.948235
---------+--------------------------------------------------------------------
Combined |   9,046    7.778023    .0887559    8.441613    7.604042    7.952005
---------+--------------------------------------------------------------------
    diff |            .1562747    .1775991               -.1918597    .5044091
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   0.8799
H0: diff = 0                                     Degrees of freedom =     9044

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.8105         Pr(|T| > |t|) = 0.3789          Pr(T > t) = 0.1895

.                                 local  m1=r(mu_1) 

.                                 local se1 = r(sd_1)/(sqrt(r(N_1)))

.                                 local  m2=r(mu_2)

.                                 local se2 = r(sd_2)/(sqrt(r(N_2)))

.                                 replace e=`m1' if _n==4
(1 real change made)

.                                 replace hi = `m1' + 1.95* `se1' if _n==4
(1 real change made)

.                                 replace lo = `m1' - 1.95* `se1'  if _n==4
(1 real change made)

.                                 replace e=`m2' if _n==5
(1 real change made)

.                                 replace hi = `m2' + 1.95*`se2' if _n==5
(1 real change made)

.                                 replace lo = `m2' - 1.95*`se2' if _n==5 
(1 real change made)

.                                 twoway (bar e n if n<=5,barwidth(.5)bcol(gs13)yti
> t("Years of experience")saving(h2.gph,replace)) ///
>                                         (rspike hi lo n if n<=5,ylab(3(3)9)col(gs
> 1)legend(off)xtit("")tit(Party experience) ///
>                                         xlab(1 `""{bf:Low} party" "personalism""'
>  2 `""{bf:High} party" "personalism""' ///
>                                         4 `""{bf:Low} party" "populism""' 5  `""{
> bf:High} party" "populism""')xscale(range(0.5 5.5)))
(file h2.gph not found)
file h2.gph saved

.                                 gr combine h1.gph h2.gph,xsize(8)tit(Candidate ex
> perience)note("Comparative Candidate Survey data.",size(vsmall))

.                                 gr export "$dir\golden\Ch3-CCS-elite-experience-p
> ers-pop.pdf",as(pdf)replace 
file
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\golden\C
    > h3-CCS-elite-experience-pers-pop.pdf saved as PDF format

.                                         
.                                 * Adjust for party populism *
.                                 xi:xtnbreg govexp $d opposition v2paseats v2xpa_p
> opul,i(id) 

Fitting negative binomial (constant dispersion) model:

Iteration 0:  Log likelihood = -49007.466  
Iteration 1:  Log likelihood = -49007.424  
Iteration 2:  Log likelihood = -49007.424  

Iteration 0:  Log likelihood = -34745.149  
Iteration 1:  Log likelihood = -26545.713  
Iteration 2:  Log likelihood = -24736.714  
Iteration 3:  Log likelihood = -24429.357  
Iteration 4:  Log likelihood = -24428.803  
Iteration 5:  Log likelihood = -24428.803  

Iteration 0:  Log likelihood = -24428.803  
Iteration 1:  Log likelihood = -24142.186  
Iteration 2:  Log likelihood = -24130.194  
Iteration 3:  Log likelihood = -24130.149  
Iteration 4:  Log likelihood = -24130.149  

Fitting full model:

Iteration 0:  Log likelihood =  -29514.54  
Iteration 1:  Log likelihood = -23633.448  
Iteration 2:  Log likelihood =  -23337.04  
Iteration 3:  Log likelihood =  -23306.11  
Iteration 4:  Log likelihood =  -23298.92  
Iteration 5:  Log likelihood = -23298.911  
Iteration 6:  Log likelihood = -23298.911  

Random-effects negative binomial regression          Number of obs    =  9,441
Group variable: id                                   Number of groups =     26

Random effects u_i ~ Beta                            Obs per group:
                                                                  min =    101
                                                                  avg =  363.1
                                                                  max =  1,182

                                                     Wald chi2(4)     = 567.44
Log likelihood = -23298.911                          Prob > chi2      = 0.0000

-------------------------------------------------------------------------------
       govexp | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
      v2paind |  -.8436857   .0969269    -8.70   0.000    -1.033659   -.6537124
   opposition |  -.3269953   .0279725   -11.69   0.000    -.3818205   -.2721701
v2paseatshare |   .0128688   .0009351    13.76   0.000      .011036    .0147016
  v2xpa_popul |  -.0456435   .0707164    -0.65   0.519    -.1842451     .092958
        _cons |  -.4686436   .0357985   -13.09   0.000    -.5388073   -.3984798
--------------+----------------------------------------------------------------
        /ln_r |   .7403981   .2626136                       .225685    1.255111
        /ln_s |   2.507134   .2920866                      1.934655    3.079614
--------------+----------------------------------------------------------------
            r |    2.09677   .5506403                      1.253181    3.508229
            s |   12.26972   3.583821                      6.921657       21.75
-------------------------------------------------------------------------------
LR test vs. pooled: chibar2(01) = 1662.48              Prob >= chibar2 = 0.000

.                                 xi:xtnbreg govexp $d age v2xpa_popul,i(id) 

Fitting negative binomial (constant dispersion) model:

Iteration 0:  Log likelihood =   -32801.2  
Iteration 1:  Log likelihood = -32801.175  
Iteration 2:  Log likelihood = -32801.175  

Iteration 0:  Log likelihood = -25001.254  
Iteration 1:  Log likelihood = -18236.817  
Iteration 2:  Log likelihood = -17391.052  
Iteration 3:  Log likelihood =  -17331.63  
Iteration 4:  Log likelihood =  -17331.58  
Iteration 5:  Log likelihood =  -17331.58  

Iteration 0:  Log likelihood =  -17331.58  
Iteration 1:  Log likelihood = -17014.098  
Iteration 2:  Log likelihood = -16993.895  
Iteration 3:  Log likelihood =  -16993.83  
Iteration 4:  Log likelihood =  -16993.83  

Fitting full model:

Iteration 0:  Log likelihood = -20233.968  
Iteration 1:  Log likelihood = -17243.222  
Iteration 2:  Log likelihood = -16535.965  
Iteration 3:  Log likelihood = -16471.816  
Iteration 4:  Log likelihood = -16410.186  
Iteration 5:  Log likelihood = -16407.231  
Iteration 6:  Log likelihood = -16407.196  
Iteration 7:  Log likelihood = -16407.196  

Random-effects negative binomial regression          Number of obs    =  6,916
Group variable: id                                   Number of groups =     22

Random effects u_i ~ Beta                            Obs per group:
                                                                  min =     89
                                                                  avg =  314.4
                                                                  max =    773

                                                     Wald chi2(3)     = 667.37
Log likelihood = -16407.196                          Prob > chi2      = 0.0000

------------------------------------------------------------------------------
      govexp | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.7064293   .1122763    -6.29   0.000    -.9264868   -.4863718
         age |    .026385   .0011219    23.52   0.000     .0241861    .0285839
 v2xpa_popul |  -.5048947   .0745352    -6.77   0.000    -.6509809   -.3588085
       _cons |   -1.53655   .0605768   -25.37   0.000    -1.655279   -1.417822
-------------+----------------------------------------------------------------
       /ln_r |   .7680685    .286648                      .2062488    1.329888
       /ln_s |   2.539893   .3182217                       1.91619    3.163596
-------------+----------------------------------------------------------------
           r |   2.155599   .6178981                      1.229059    3.780621
           s |   12.67831   4.034514                      6.795019    23.65551
------------------------------------------------------------------------------
LR test vs. pooled: chibar2(01) = 1173.27              Prob >= chibar2 = 0.000

.                                 xi:xtnbreg govexp $d opposition v2paseats age v2x
> pa_popul,i(id) 

Fitting negative binomial (constant dispersion) model:

Iteration 0:  Log likelihood = -32370.252  
Iteration 1:  Log likelihood = -32370.206  
Iteration 2:  Log likelihood = -32370.206  

Iteration 0:  Log likelihood = -25001.254  
Iteration 1:  Log likelihood = -18236.817  
Iteration 2:  Log likelihood = -17391.052  
Iteration 3:  Log likelihood =  -17331.63  
Iteration 4:  Log likelihood =  -17331.58  
Iteration 5:  Log likelihood =  -17331.58  

Iteration 0:  Log likelihood =  -17331.58  
Iteration 1:  Log likelihood = -16931.516  
Iteration 2:  Log likelihood = -16892.898  
Iteration 3:  Log likelihood = -16892.844  
Iteration 4:  Log likelihood = -16892.844  

Fitting full model:

Iteration 0:  Log likelihood = -19839.932  
Iteration 1:  Log likelihood = -18242.313  
Iteration 2:  Log likelihood = -16452.002  (not concave)
Iteration 3:  Log likelihood = -16263.597  
Iteration 4:  Log likelihood =  -16258.33  
Iteration 5:  Log likelihood = -16258.205  
Iteration 6:  Log likelihood = -16258.205  

Random-effects negative binomial regression          Number of obs    =  6,916
Group variable: id                                   Number of groups =     22

Random effects u_i ~ Beta                            Obs per group:
                                                                  min =     89
                                                                  avg =  314.4
                                                                  max =    773

                                                     Wald chi2(5)     = 995.46
Log likelihood = -16258.205                          Prob > chi2      = 0.0000

-------------------------------------------------------------------------------
       govexp | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
      v2paind |  -.7272153    .114666    -6.34   0.000    -.9519565    -.502474
   opposition |  -.3540782   .0340534   -10.40   0.000    -.4208217   -.2873347
v2paseatshare |   .0109762   .0010862    10.11   0.000     .0088473     .013105
          age |   .0271118   .0011201    24.21   0.000     .0249166    .0293071
  v2xpa_popul |  -.2191495   .0784724    -2.79   0.005    -.3729526   -.0653465
        _cons |  -1.666501   .0676266   -24.64   0.000    -1.799046   -1.533955
--------------+----------------------------------------------------------------
        /ln_r |   .7924903   .2867845                      .2304031    1.354578
        /ln_s |   2.505451   .3171793                      1.883791    3.127111
--------------+----------------------------------------------------------------
            r |    2.20889   .6334755                      1.259107    3.875124
            s |   12.24908   3.885155                      6.578397    22.80799
-------------------------------------------------------------------------------
LR test vs. pooled: chibar2(01) = 1269.28              Prob >= chibar2 = 0.000

.                                 xi:xtnbreg govexp $d age male i.education v2pasea
> t opposition incentive v2xpa_popul,i(id)
i.education       _Ieducation_1-5     (_Ieducation_1 for education==-1 omitted)

Fitting negative binomial (constant dispersion) model:

Iteration 0:  Log likelihood = -31199.542  
Iteration 1:  Log likelihood = -31199.414  
Iteration 2:  Log likelihood = -31199.414  

Iteration 0:  Log likelihood = -24973.162  
Iteration 1:  Log likelihood = -18211.932  
Iteration 2:  Log likelihood =  -17374.05  
Iteration 3:  Log likelihood = -17316.211  
Iteration 4:  Log likelihood = -17316.164  
Iteration 5:  Log likelihood = -17316.164  

Iteration 0:  Log likelihood = -17316.164  
Iteration 1:  Log likelihood = -16772.718  
Iteration 2:  Log likelihood =  -16619.09  
Iteration 3:  Log likelihood = -16616.186  
Iteration 4:  Log likelihood = -16616.185  

Fitting full model:

Iteration 0:  Log likelihood = -19516.064  
Iteration 1:  Log likelihood = -17847.528  
Iteration 2:  Log likelihood = -16134.869  
Iteration 3:  Log likelihood = -15934.801  
Iteration 4:  Log likelihood = -15910.353  
Iteration 5:  Log likelihood = -15909.173  
Iteration 6:  Log likelihood = -15909.165  
Iteration 7:  Log likelihood = -15909.165  

Random-effects negative binomial regression         Number of obs    =   6,911
Group variable: id                                  Number of groups =      22

Random effects u_i ~ Beta                           Obs per group:
                                                                 min =      89
                                                                 avg =   314.1
                                                                 max =     773

                                                    Wald chi2(11)    = 1671.37
Log likelihood = -15909.165                         Prob > chi2      =  0.0000

-------------------------------------------------------------------------------
       govexp | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
      v2paind |  -.3801489   .1110161    -3.42   0.001    -.5977364   -.1625615
          age |   .0297366    .001098    27.08   0.000     .0275846    .0318886
         male |   .1315893   .0298054     4.41   0.000     .0731718    .1900067
_Ieducation_2 |   .0746396   .0780095     0.96   0.339    -.0782563    .2275355
_Ieducation_3 |  -.0507103   .0961202    -0.53   0.598    -.2391024    .1376817
_Ieducation_4 |  -.1594513   .0583528    -2.73   0.006    -.2738206   -.0450819
_Ieducation_5 |  -.1153924   .0497535    -2.32   0.020    -.2129074   -.0178774
v2paseatshare |   .0175786   .0011404    15.41   0.000     .0153434    .0198138
   opposition |   -.199721   .0325706    -6.13   0.000    -.2635583   -.1358838
    incentive |  -.4933936   .0208454   -23.67   0.000    -.5342499   -.4525373
  v2xpa_popul |  -.3225335    .075212    -4.29   0.000    -.4699464   -.1751207
        _cons |  -.9540947   .0826388   -11.55   0.000    -1.116064   -.7921256
--------------+----------------------------------------------------------------
        /ln_r |    .457806   .2800184                       -.09102    1.006632
        /ln_s |   1.940704   .3184293                      1.316594    2.564814
--------------+----------------------------------------------------------------
            r |   1.580602   .4425977                      .9129995    2.736369
            s |   6.963654   2.217431                      3.730695    12.99824
-------------------------------------------------------------------------------
LR test vs. pooled: chibar2(01) = 1414.04              Prob >= chibar2 = 0.000

.                                 est store p1

.                                 xi:xtnbreg govexp $d age male i.education v2pasea
> t opposition incentive v2xpa_popul,i(id)fe 
i.education       _Ieducation_1-5     (_Ieducation_1 for education==-1 omitted)

Iteration 0:  Log likelihood = -19289.245  
Iteration 1:  Log likelihood = -16795.144  
Iteration 2:  Log likelihood = -16012.138  
Iteration 3:  Log likelihood = -15738.156  
Iteration 4:  Log likelihood = -15725.586  
Iteration 5:  Log likelihood = -15725.559  
Iteration 6:  Log likelihood = -15725.559  

Conditional FE negative binomial regression         Number of obs    =   6,911
Group variable: id                                  Number of groups =      22

                                                    Obs per group:
                                                                 min =      89
                                                                 avg =   314.1
                                                                 max =     773

                                                    Wald chi2(11)    = 1680.36
Log likelihood = -15725.559                         Prob > chi2      =  0.0000

-------------------------------------------------------------------------------
       govexp | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
      v2paind |  -.3642245    .111069    -3.28   0.001    -.5819158   -.1465331
          age |   .0297443   .0010981    27.09   0.000      .027592    .0318965
         male |    .131289   .0297901     4.41   0.000     .0729015    .1896766
_Ieducation_2 |   .0750682   .0780548     0.96   0.336    -.0779164    .2280527
_Ieducation_3 |  -.0436687   .0960233    -0.45   0.649    -.2318709    .1445335
_Ieducation_4 |  -.1529066   .0584332    -2.62   0.009    -.2674335   -.0383796
_Ieducation_5 |  -.1111177   .0498817    -2.23   0.026     -.208884   -.0133514
v2paseatshare |   .0175878   .0011405    15.42   0.000     .0153525    .0198232
   opposition |  -.1987127   .0325587    -6.10   0.000    -.2625266   -.1348989
    incentive |  -.5006587   .0209369   -23.91   0.000    -.5416943    -.459623
  v2xpa_popul |  -.3297904   .0752466    -4.38   0.000    -.4772711   -.1823097
        _cons |  -.9448303   .0828107   -11.41   0.000    -1.107136   -.7825242
-------------------------------------------------------------------------------

.                                 xi:xtnbreg parexp $d v2xpa_popul,i(id) 

Fitting negative binomial (constant dispersion) model:

Iteration 0:  Log likelihood = -51582.738  
Iteration 1:  Log likelihood = -51582.734  

Iteration 0:  Log likelihood =  -37102.19  
Iteration 1:  Log likelihood = -28532.683  
Iteration 2:  Log likelihood = -28042.689  
Iteration 3:  Log likelihood = -28038.903  
Iteration 4:  Log likelihood = -28038.903  

Iteration 0:  Log likelihood = -28038.903  
Iteration 1:  Log likelihood = -27887.592  
Iteration 2:  Log likelihood =  -27885.05  
Iteration 3:  Log likelihood =  -27885.05  

Fitting full model:

Iteration 0:  Log likelihood = -32597.503  
Iteration 1:  Log likelihood =   -29277.2  
Iteration 2:  Log likelihood = -27774.144  (not concave)
Iteration 3:  Log likelihood =  -26956.63  
Iteration 4:  Log likelihood = -26907.313  
Iteration 5:  Log likelihood = -26904.041  
Iteration 6:  Log likelihood = -26904.006  
Iteration 7:  Log likelihood = -26904.006  

Random-effects negative binomial regression          Number of obs    =  9,046
Group variable: id                                   Number of groups =     24

Random effects u_i ~ Beta                            Obs per group:
                                                                  min =    115
                                                                  avg =  376.9
                                                                  max =  1,359

                                                     Wald chi2(2)     = 140.56
Log likelihood = -26904.006                          Prob > chi2      = 0.0000

------------------------------------------------------------------------------
      parexp | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.7267696   .0816887    -8.90   0.000    -.8868765   -.5666627
 v2xpa_popul |  -.0828186   .0531022    -1.56   0.119     -.186897    .0212597
       _cons |   .2508268   .0255385     9.82   0.000     .2007723    .3008814
-------------+----------------------------------------------------------------
       /ln_r |   .6661766   .2732076                      .1306994    1.201654
       /ln_s |   2.248512   .3049494                      1.650822    2.846202
-------------+----------------------------------------------------------------
           r |    1.94678   .5318751                      1.139625    3.325612
           s |   9.473628   2.888977                      5.211262    17.22224
------------------------------------------------------------------------------
LR test vs. pooled: chibar2(01) = 1962.09              Prob >= chibar2 = 0.000

.                                 xi:xtnbreg parexp $d opposition v2paseats v2xpa_p
> opul,i(id)

Fitting negative binomial (constant dispersion) model:

Iteration 0:  Log likelihood = -51115.028  
Iteration 1:  Log likelihood = -51115.017  
Iteration 2:  Log likelihood = -51115.017  

Iteration 0:  Log likelihood =  -37102.19  
Iteration 1:  Log likelihood = -28532.683  
Iteration 2:  Log likelihood = -28042.689  
Iteration 3:  Log likelihood = -28038.903  
Iteration 4:  Log likelihood = -28038.903  

Iteration 0:  Log likelihood = -28038.903  
Iteration 1:  Log likelihood = -27820.853  
Iteration 2:  Log likelihood = -27814.339  
Iteration 3:  Log likelihood = -27814.333  
Iteration 4:  Log likelihood = -27814.333  

Fitting full model:

Iteration 0:  Log likelihood = -32253.884  
Iteration 1:  Log likelihood = -28995.071  
Iteration 2:  Log likelihood = -27561.898  (not concave)
Iteration 3:  Log likelihood = -26806.396  
Iteration 4:  Log likelihood = -26771.914  
Iteration 5:  Log likelihood = -26769.501  
Iteration 6:  Log likelihood = -26769.468  
Iteration 7:  Log likelihood = -26769.468  

Random-effects negative binomial regression          Number of obs    =  9,046
Group variable: id                                   Number of groups =     24

Random effects u_i ~ Beta                            Obs per group:
                                                                  min =    115
                                                                  avg =  376.9
                                                                  max =  1,359

                                                     Wald chi2(4)     = 408.63
Log likelihood = -26769.468                          Prob > chi2      = 0.0000

-------------------------------------------------------------------------------
       parexp | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
      v2paind |  -.9068527   .0813317   -11.15   0.000     -1.06626   -.7474455
   opposition |  -.2153497   .0220865    -9.75   0.000    -.2586383    -.172061
v2paseatshare |    .008978   .0007714    11.64   0.000     .0074662    .0104898
  v2xpa_popul |   .1520259   .0563645     2.70   0.007     .0415535    .2624983
        _cons |   .1894041   .0304293     6.22   0.000     .1297638    .2490445
--------------+----------------------------------------------------------------
        /ln_r |   .6860029   .2734127                       .150124    1.221882
        /ln_s |   2.228459    .304141                      1.632354    2.824565
--------------+----------------------------------------------------------------
            r |   1.985762   .5429326                      1.161978    3.393568
            s |   9.285548   2.824116                      5.115902    16.85361
-------------------------------------------------------------------------------
LR test vs. pooled: chibar2(01) = 2089.73              Prob >= chibar2 = 0.000

.                                 xi:xtnbreg parexp $d age v2xpa_popul,i(id) 

Fitting negative binomial (constant dispersion) model:

Iteration 0:  Log likelihood = -33580.539  
Iteration 1:  Log likelihood = -33580.536  

Iteration 0:  Log likelihood = -25900.914  
Iteration 1:  Log likelihood = -19706.693  
Iteration 2:  Log likelihood = -19633.767  
Iteration 3:  Log likelihood = -19633.688  
Iteration 4:  Log likelihood = -19633.688  

Iteration 0:  Log likelihood = -19633.688  
Iteration 1:  Log likelihood = -19378.677  
Iteration 2:  Log likelihood = -19367.498  
Iteration 3:  Log likelihood = -19367.475  
Iteration 4:  Log likelihood = -19367.475  

Fitting full model:

Iteration 0:  Log likelihood = -21940.404  
Iteration 1:  Log likelihood = -20914.658  (not concave)
Iteration 2:  Log likelihood = -19171.212  
Iteration 3:  Log likelihood =  -18731.67  
Iteration 4:  Log likelihood = -18719.319  
Iteration 5:  Log likelihood = -18683.683  
Iteration 6:  Log likelihood = -18682.471  
Iteration 7:  Log likelihood = -18682.298  
Iteration 8:  Log likelihood = -18682.298  

Random-effects negative binomial regression          Number of obs    =  6,452
Group variable: id                                   Number of groups =     20

Random effects u_i ~ Beta                            Obs per group:
                                                                  min =    104
                                                                  avg =  322.6
                                                                  max =    788

                                                     Wald chi2(3)     = 480.29
Log likelihood = -18682.298                          Prob > chi2      = 0.0000

------------------------------------------------------------------------------
      parexp | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -1.052944   .0957473   -11.00   0.000    -1.240605   -.8652823
         age |   .0163059   .0009027    18.06   0.000     .0145366    .0180751
 v2xpa_popul |  -.0770281   .0601025    -1.28   0.200    -.1948269    .0407706
       _cons |  -.3619622   .0483124    -7.49   0.000    -.4566528   -.2672717
-------------+----------------------------------------------------------------
       /ln_r |   1.204132   .3069863                      .6024504    1.805815
       /ln_s |   2.875259   .3278837                      2.232619    3.517899
-------------+----------------------------------------------------------------
           r |   3.333866   1.023451                      1.826589    6.084926
           s |   17.73002   5.813383                      9.324254    33.71353
------------------------------------------------------------------------------
LR test vs. pooled: chibar2(01) = 1370.35              Prob >= chibar2 = 0.000

.                                 xi:xtnbreg parexp $d opposition v2paseats age v2x
> pa_popul,i(id) 

Fitting negative binomial (constant dispersion) model:

Iteration 0:  Log likelihood = -33111.219  
Iteration 1:  Log likelihood = -33111.211  
Iteration 2:  Log likelihood = -33111.211  

Iteration 0:  Log likelihood = -25900.914  
Iteration 1:  Log likelihood = -19706.693  
Iteration 2:  Log likelihood = -19633.767  
Iteration 3:  Log likelihood = -19633.688  
Iteration 4:  Log likelihood = -19633.688  

Iteration 0:  Log likelihood = -19633.688  
Iteration 1:  Log likelihood = -19322.371  
Iteration 2:  Log likelihood = -19303.283  
Iteration 3:  Log likelihood = -19303.211  
Iteration 4:  Log likelihood = -19303.211  

Fitting full model:

Iteration 0:  Log likelihood = -21713.503  
Iteration 1:  Log likelihood = -20894.254  (not concave)
Iteration 2:  Log likelihood = -19251.403  
Iteration 3:  Log likelihood = -18735.877  (not concave)
Iteration 4:  Log likelihood =  -18615.64  
Iteration 5:  Log likelihood = -18601.169  
Iteration 6:  Log likelihood = -18600.757  
Iteration 7:  Log likelihood = -18600.756  

Random-effects negative binomial regression          Number of obs    =  6,452
Group variable: id                                   Number of groups =     20

Random effects u_i ~ Beta                            Obs per group:
                                                                  min =    104
                                                                  avg =  322.6
                                                                  max =    788

                                                     Wald chi2(5)     = 652.80
Log likelihood = -18600.756                          Prob > chi2      = 0.0000

-------------------------------------------------------------------------------
       parexp | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
      v2paind |  -1.035869   .0958947   -10.80   0.000    -1.223819   -.8479191
   opposition |  -.1962176   .0265372    -7.39   0.000    -.2482295   -.1442056
v2paseatshare |   .0076448   .0009139     8.37   0.000     .0058536    .0094359
          age |   .0165766   .0009016    18.39   0.000     .0148096    .0183437
  v2xpa_popul |   .0626569   .0621973     1.01   0.314    -.0592476    .1845613
        _cons |  -.4551168   .0541623    -8.40   0.000     -.561273   -.3489606
--------------+----------------------------------------------------------------
        /ln_r |   1.237947   .3074949                      .6352681    1.840626
        /ln_s |    2.87798   .3275326                      2.236028    3.519932
--------------+----------------------------------------------------------------
            r |   3.448527   1.060404                      1.887528    6.300481
            s |   17.77832    5.82298                      9.356091    33.78213
-------------------------------------------------------------------------------
LR test vs. pooled: chibar2(01) = 1404.91              Prob >= chibar2 = 0.000

.                                 xi:xtnbreg parexp $d age male i.education v2pasea
> t opposition incentive v2xpa_popul,i(id) 
i.education       _Ieducation_1-5     (_Ieducation_1 for education==-1 omitted)

Fitting negative binomial (constant dispersion) model:

Iteration 0:  Log likelihood = -31582.499  
Iteration 1:  Log likelihood =  -31582.45  
Iteration 2:  Log likelihood =  -31582.45  

Iteration 0:  Log likelihood = -25880.791  
Iteration 1:  Log likelihood = -19688.159  
Iteration 2:  Log likelihood = -19614.097  
Iteration 3:  Log likelihood = -19614.015  
Iteration 4:  Log likelihood = -19614.015  

Iteration 0:  Log likelihood = -19614.015  
Iteration 1:  Log likelihood = -19151.992  
Iteration 2:  Log likelihood = -19048.601  
Iteration 3:  Log likelihood = -19048.131  
Iteration 4:  Log likelihood = -19048.131  

Fitting full model:

Iteration 0:  Log likelihood = -21631.068  
Iteration 1:  Log likelihood =  -21223.46  (not concave)
Iteration 2:  Log likelihood = -19356.505  
Iteration 3:  Log likelihood = -19016.876  
Iteration 4:  Log likelihood = -18485.089  
Iteration 5:  Log likelihood = -18469.501  
Iteration 6:  Log likelihood = -18468.894  
Iteration 7:  Log likelihood = -18468.891  
Iteration 8:  Log likelihood = -18468.891  

Random-effects negative binomial regression          Number of obs    =  6,446
Group variable: id                                   Number of groups =     20

Random effects u_i ~ Beta                            Obs per group:
                                                                  min =    103
                                                                  avg =  322.3
                                                                  max =    788

                                                     Wald chi2(11)    = 892.69
Log likelihood = -18468.891                          Prob > chi2      = 0.0000

-------------------------------------------------------------------------------
       parexp | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
      v2paind |  -.8220919   .0938227    -8.76   0.000    -1.005981   -.6382028
          age |   .0173064    .000896    19.32   0.000     .0155503    .0190624
         male |   .1524526   .0242036     6.30   0.000     .1050143    .1998908
_Ieducation_2 |  -.0275643   .0662805    -0.42   0.678    -.1574718    .1023432
_Ieducation_3 |   .1072396    .078193     1.37   0.170    -.0460159    .2604952
_Ieducation_4 |  -.1219579    .048156    -2.53   0.011    -.2163418   -.0275739
_Ieducation_5 |  -.1114043   .0420793    -2.65   0.008    -.1938783   -.0289303
v2paseatshare |   .0099404   .0009384    10.59   0.000     .0081012    .0117796
   opposition |   -.148592   .0260489    -5.70   0.000     -.199647    -.097537
    incentive |  -.2341197   .0180041   -13.00   0.000     -.269407   -.1988324
  v2xpa_popul |  -.0187344   .0614511    -0.30   0.760    -.1391764    .1017076
        _cons |  -.0855452   .0680641    -1.26   0.209    -.2189483    .0478579
--------------+----------------------------------------------------------------
        /ln_r |   1.285762    .308616                      .6808854    1.890638
        /ln_s |   2.867265   .3278939                      2.224605    3.509925
--------------+----------------------------------------------------------------
            r |   3.617422   1.116394                      1.975626    6.623592
            s |   17.58885   5.767276                      9.249826    33.44577
-------------------------------------------------------------------------------
LR test vs. pooled: chibar2(01) = 1158.48              Prob >= chibar2 = 0.000

.                                 est store p2

.                                 xi:xtnbreg parexp $d age male i.education v2pasea
> t opposition incentive v2xpa_popul,i(id)fe 
i.education       _Ieducation_1-5     (_Ieducation_1 for education==-1 omitted)

Iteration 0:  Log likelihood = -21404.603  
Iteration 1:  Log likelihood = -20152.417  
Iteration 2:  Log likelihood = -18962.986  
Iteration 3:  Log likelihood = -18334.923  
Iteration 4:  Log likelihood = -18300.827  
Iteration 5:  Log likelihood = -18300.761  
Iteration 6:  Log likelihood = -18300.761  

Conditional FE negative binomial regression          Number of obs    =  6,446
Group variable: id                                   Number of groups =     20

                                                     Obs per group:
                                                                  min =    103
                                                                  avg =  322.3
                                                                  max =    788

                                                     Wald chi2(11)    = 890.69
Log likelihood = -18300.761                          Prob > chi2      = 0.0000

-------------------------------------------------------------------------------
       parexp | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
      v2paind |  -.8247175   .0940431    -8.77   0.000    -1.009039   -.6403964
          age |    .017289   .0008969    19.28   0.000     .0155312    .0190468
         male |   .1531374   .0242042     6.33   0.000     .1056979    .2005768
_Ieducation_2 |  -.0240985   .0663852    -0.36   0.717    -.1542111    .1060142
_Ieducation_3 |   .1111977   .0782711     1.42   0.155    -.0422108    .2646063
_Ieducation_4 |   -.114347   .0482987    -2.37   0.018    -.2090106   -.0196833
_Ieducation_5 |  -.1052843   .0422637    -2.49   0.013    -.1881195    -.022449
v2paseatshare |   .0098657   .0009394    10.50   0.000     .0080244    .0117069
   opposition |  -.1499456   .0260674    -5.75   0.000    -.2010367   -.0988545
    incentive |  -.2367117   .0181997   -13.01   0.000    -.2723824   -.2010409
  v2xpa_popul |  -.0163306   .0615172    -0.27   0.791    -.1369021    .1042409
        _cons |  -.0825216   .0683594    -1.21   0.227    -.2165036    .0514604
-------------------------------------------------------------------------------

.                                 label var male "Male candidate"

.                                 label var age "Candidate age"

.                                 label var opposition "Opposition party"

.                                 label var v2paseats "# of legislative seats"

.                                 label var v2paind "Party {bf:personalism}"

.                                 label var v2xpa_popul "Party {bf:populism}"

.                                 label var incentive `""Institutional incentive to
> " "cultivate personal vote""'

.                                 coefplot (p1, msymbol(D)mfcolor(gs1))(p2,mfcolor(
> gs8)msymbol(circle)), order(v2paind v2xpa_popul)  ///
>                                                 drop(_cons _Ieducation_*) xline(0
> ) msymbol(d) mfcolor(white) grid(glcolor(gs15)) ///
>                                                 levels(95 90) legend(lab(3 "Gover
> nment experience")lab(6 "Party experience") order(3 6 ) ///
>                                                 size(small) pos(6) col(4) ring(1)
> ) xsize(2) ysize(2) xlab(-1(.5).5)  ///
>                                                 xtitle("        Coefficient estim
> ate", size(small))  ///
>                                                 ciopts(lwidth(thin)) aspectratio(
> 1) scale(.85)  ///
>                                                 title(Candidate experience, size(
> large) height(3)) ///
>                                                 note("Estimates for candidate edu
> cation level not reported.", size(vsmall)pos(6))  

.                                 gr export "$dir\golden\T-CCS-elite-experience-per
> s-pop.pdf",as(pdf)replace 
file
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\golden\T
    > -CCS-elite-experience-pers-pop.pdf saved as PDF format

. 
. 
.                 *****************************************************************
> *******************
.                 *** Personalist party candidates more likely to be nominated by p
> arty leadership ***
.                 *****************************************************************
> *******************
.                         gen leadernom = 1 if b3a==5
(10,674 missing values generated)

.                         replace leadernom = 0 if b3a==1 |  b3a==2 | b3a==3 | b3a=
> =4 |   b3a==7
(4,571 real changes made)

.                         tab b3a leadernom

Who made the decision |
           about your |       leadernom
          nomination? |         0          1 |     Total
----------------------+----------------------+----------
      voters at large |       157          0 |       157 
   voters of my party |       250          0 |       250 
  members of my party |     1,948          0 |     1,948 
a party delegate conf |     2,129          0 |     2,129 
     party leadership |         0      1,656 |     1,656 
               others |        87          0 |        87 
----------------------+----------------------+----------
                Total |     4,571      1,656 |     6,227 

.                         
.                         * Multilevel reported model *
.                         xi:meglm leadernom $d || countryid: ,fam(binomial)link(pr
> obit)

Fitting fixed-effects model:

Iteration 0:  Log likelihood = -3188.1543  
Iteration 1:  Log likelihood =  -3187.854  
Iteration 2:  Log likelihood =  -3187.854  

Refining starting values:

Grid node 0:  Log likelihood = -2246.0282

Fitting full model:

Iteration 0:  Log likelihood = -2246.0282  
Iteration 1:  Log likelihood = -2217.8446  
Iteration 2:  Log likelihood = -2217.7462  
Iteration 3:  Log likelihood = -2217.7454  
Iteration 4:  Log likelihood = -2217.7457  
Iteration 5:  Log likelihood = -2217.7458  

Mixed-effects GLM                               Number of obs     =      6,041
Family: Binomial
Link:   Probit
Group variable: countryid                       Number of groups  =         14

                                                Obs per group:
                                                              min =         92
                                                              avg =      431.5
                                                              max =      1,109

Integration method: mvaghermite                 Integration pts.  =          7

                                                Wald chi2(1)      =      66.10
Log likelihood = -2217.7458                     Prob > chi2       =     0.0000
------------------------------------------------------------------------------
   leadernom | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |   .9912463   .1219201     8.13   0.000     .7522873    1.230205
       _cons |  -1.246428   .2983655    -4.18   0.000    -1.831214   -.6616427
-------------+----------------------------------------------------------------
countryid    |
   var(_cons)|   1.279155   .5327138                      .5655017    2.893427
------------------------------------------------------------------------------
LR test vs. probit model: chibar2(01) = 1940.22       Prob >= chibar2 = 0.0000

.                         margins,dydx(v2paind)

Average marginal effects                                 Number of obs = 6,041
Model VCE: OIM

Expression: Marginal predicted mean, predict()
dy/dx wrt:  v2paind

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |   .2112999   .0400337     5.28   0.000     .1328352    .2897646
------------------------------------------------------------------------------

.                         xi:meglm leadernom $d age || countryid: ,fam(binomial)lin
> k(probit)

Fitting fixed-effects model:

Iteration 0:  Log likelihood = -2273.5702  
Iteration 1:  Log likelihood = -2272.9666  
Iteration 2:  Log likelihood = -2272.9666  

Refining starting values:

Grid node 0:  Log likelihood = -1673.9996

Fitting full model:

Iteration 0:  Log likelihood = -1673.9996  
Iteration 1:  Log likelihood = -1648.7346  
Iteration 2:  Log likelihood = -1648.7037  
Iteration 3:  Log likelihood = -1648.7039  
Iteration 4:  Log likelihood =  -1648.704  

Mixed-effects GLM                               Number of obs     =      4,042
Family: Binomial
Link:   Probit
Group variable: countryid                       Number of groups  =         12

                                                Obs per group:
                                                              min =         85
                                                              avg =      336.8
                                                              max =        699

Integration method: mvaghermite                 Integration pts.  =          7

                                                Wald chi2(2)      =      57.61
Log likelihood = -1648.704                      Prob > chi2       =     0.0000
------------------------------------------------------------------------------
   leadernom | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |   .9752702   .1485621     6.56   0.000     .6840939    1.266447
         age |   .0083071   .0021939     3.79   0.000     .0040071     .012607
       _cons |  -1.456992   .3292691    -4.42   0.000    -2.102348   -.8116368
-------------+----------------------------------------------------------------
countryid    |
   var(_cons)|   1.177602   .5305967                      .4869329     2.84792
------------------------------------------------------------------------------
LR test vs. probit model: chibar2(01) = 1248.53       Prob >= chibar2 = 0.0000

.                         margins,dydx(v2paind)

Average marginal effects                                 Number of obs = 4,042
Model VCE: OIM

Expression: Marginal predicted mean, predict()
dy/dx wrt:  v2paind

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |   .2280746   .0473035     4.82   0.000     .1353613    .3207878
------------------------------------------------------------------------------

.                         xi:meglm leadernom $d age male i.education || countryid:,
> fam(binomial)link(probit)
i.education       _Ieducation_1-5     (_Ieducation_1 for education==-1 omitted)

Fitting fixed-effects model:

Iteration 0:  Log likelihood = -2181.4532  
Iteration 1:  Log likelihood = -2167.9905  
Iteration 2:  Log likelihood = -2167.4652  
Iteration 3:  Log likelihood = -2167.4617  
Iteration 4:  Log likelihood = -2167.4617  

Refining starting values:

Grid node 0:  Log likelihood = -1668.7406

Fitting full model:

Iteration 0:  Log likelihood = -1668.7406  
Iteration 1:  Log likelihood = -1651.4465  
Iteration 2:  Log likelihood = -1635.4157  
Iteration 3:  Log likelihood = -1635.2958  
Iteration 4:  Log likelihood = -1635.2955  
Iteration 5:  Log likelihood = -1635.2956  

Mixed-effects GLM                               Number of obs     =      4,039
Family: Binomial
Link:   Probit
Group variable: countryid                       Number of groups  =         12

                                                Obs per group:
                                                              min =         85
                                                              avg =      336.6
                                                              max =        699

Integration method: mvaghermite                 Integration pts.  =          7

                                                Wald chi2(7)      =      79.60
Log likelihood = -1635.2956                     Prob > chi2       =     0.0000
-------------------------------------------------------------------------------
    leadernom | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
      v2paind |   .9972545   .1495678     6.67   0.000      .704107    1.290402
          age |   .0087365   .0022265     3.92   0.000     .0043727    .0131003
         male |   .0046555   .0570243     0.08   0.935      -.10711     .116421
_Ieducation_2 |   .2488741   .4490502     0.55   0.579    -.6312482    1.128996
_Ieducation_3 |   .7193158   .4070554     1.77   0.077    -.0784981     1.51713
_Ieducation_4 |   .5730081   .3626687     1.58   0.114    -.1378094    1.283826
_Ieducation_5 |   .8535373    .358697     2.38   0.017     .1505041    1.556571
        _cons |  -2.053151   .4107574    -5.00   0.000    -2.858221   -1.248081
--------------+----------------------------------------------------------------
countryid     |
    var(_cons)|   1.075594   .4849608                      .4444887    2.602769
-------------------------------------------------------------------------------
LR test vs. probit model: chibar2(01) = 1064.33       Prob >= chibar2 = 0.0000

.                         margins,dydx(v2paind)

Average marginal effects                                 Number of obs = 4,039
Model VCE: OIM

Expression: Marginal predicted mean, predict()
dy/dx wrt:  v2paind

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |   .2314039   .0452719     5.11   0.000     .1426727    .3201352
------------------------------------------------------------------------------

.                                 * reported estimate: 25 % *
.                         xi:meglm leadernom $d age male i.education v2paseat oppos
> ition incentive ///
>                                 || countryid:,fam(binomial)link(probit)
i.education       _Ieducation_1-5     (_Ieducation_1 for education==-1 omitted)

Fitting fixed-effects model:

Iteration 0:  Log likelihood = -2156.7194  
Iteration 1:  Log likelihood = -2143.0998  
Iteration 2:  Log likelihood = -2142.5692  
Iteration 3:  Log likelihood = -2142.5656  
Iteration 4:  Log likelihood = -2142.5656  

Refining starting values:

Grid node 0:  Log likelihood = -1660.0003

Fitting full model:

Iteration 0:  Log likelihood = -1660.0003  
Iteration 1:  Log likelihood = -1590.9534  
Iteration 2:  Log likelihood = -1575.6058  
Iteration 3:  Log likelihood = -1575.4743  
Iteration 4:  Log likelihood = -1575.4742  
Iteration 5:  Log likelihood = -1575.4745  
Iteration 6:  Log likelihood = -1575.4745  

Mixed-effects GLM                               Number of obs     =      4,039
Family: Binomial
Link:   Probit
Group variable: countryid                       Number of groups  =         12

                                                Obs per group:
                                                              min =         85
                                                              avg =      336.6
                                                              max =        699

Integration method: mvaghermite                 Integration pts.  =          7

                                                Wald chi2(10)     =     189.01
Log likelihood = -1575.4745                     Prob > chi2       =     0.0000
-------------------------------------------------------------------------------
    leadernom | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
      v2paind |    1.13844   .1530768     7.44   0.000     .8384149    1.438465
          age |   .0081268   .0022588     3.60   0.000     .0036996    .0125541
         male |    .013035   .0578956     0.23   0.822    -.1004383    .1265084
_Ieducation_2 |   .3118029   .4678921     0.67   0.505    -.6052488    1.228855
_Ieducation_3 |   .8838132   .4341309     2.04   0.042     .0329322    1.734694
_Ieducation_4 |   .6758913   .3915566     1.73   0.084    -.0915456    1.443328
_Ieducation_5 |   .9182369   .3881525     2.37   0.018      .157472    1.679002
v2paseatshare |  -.0177906   .0023434    -7.59   0.000    -.0223835   -.0131977
   opposition |  -.6493244   .0629776   -10.31   0.000    -.7727582   -.5258905
    incentive |   .1264423   .2813217     0.45   0.653    -.4249381    .6778227
        _cons |  -1.660783   .7104264    -2.34   0.019    -3.053193   -.2683729
--------------+----------------------------------------------------------------
countryid     |
    var(_cons)|   1.316047     .59383                      .5434879    3.186784
-------------------------------------------------------------------------------
LR test vs. probit model: chibar2(01) = 1134.18       Prob >= chibar2 = 0.0000

.                         margins,dydx(v2paind)

Average marginal effects                                 Number of obs = 4,039
Model VCE: OIM

Expression: Marginal predicted mean, predict()
dy/dx wrt:  v2paind

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |    .250246   .0469719     5.33   0.000     .1581827    .3423093
------------------------------------------------------------------------------

.                         xi:meglm leadernom $d age male i.education v2paseat oppos
> ition incentive v2xpa_popul ///
>                                 || countryid:,fam(binomial)link(probit)
i.education       _Ieducation_1-5     (_Ieducation_1 for education==-1 omitted)

Fitting fixed-effects model:

Iteration 0:  Log likelihood = -2152.9852  
Iteration 1:  Log likelihood = -2139.1586  
Iteration 2:  Log likelihood = -2138.6224  
Iteration 3:  Log likelihood = -2138.6189  
Iteration 4:  Log likelihood = -2138.6189  

Refining starting values:

Grid node 0:  Log likelihood = -1671.8297

Fitting full model:

Iteration 0:  Log likelihood = -1671.8297  
Iteration 1:  Log likelihood = -1590.6176  
Iteration 2:  Log likelihood = -1572.6917  
Iteration 3:  Log likelihood =  -1572.608  
Iteration 4:  Log likelihood = -1572.6081  
Iteration 5:  Log likelihood = -1572.6084  
Iteration 6:  Log likelihood = -1572.6084  

Mixed-effects GLM                               Number of obs     =      4,039
Family: Binomial
Link:   Probit
Group variable: countryid                       Number of groups  =         12

                                                Obs per group:
                                                              min =         85
                                                              avg =      336.6
                                                              max =        699

Integration method: mvaghermite                 Integration pts.  =          7

                                                Wald chi2(11)     =     192.44
Log likelihood = -1572.6084                     Prob > chi2       =     0.0000
-------------------------------------------------------------------------------
    leadernom | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
      v2paind |   1.356611   .1792713     7.57   0.000     1.005246    1.707977
          age |   .0079339   .0022624     3.51   0.000     .0034997    .0123681
         male |   .0222994   .0580609     0.38   0.701    -.0914979    .1360967
_Ieducation_2 |   .2932412   .4674771     0.63   0.530    -.6229971    1.209479
_Ieducation_3 |   .8934439   .4350645     2.05   0.040     .0407331    1.746155
_Ieducation_4 |   .6642471   .3923321     1.69   0.090    -.1047097    1.433204
_Ieducation_5 |   .8937647    .388993     2.30   0.022     .1313525    1.656177
v2paseatshare |  -.0172683   .0023596    -7.32   0.000    -.0218929   -.0126436
   opposition |  -.5830602   .0686368    -8.49   0.000    -.7175858   -.4485345
    incentive |   .1372584    .283494     0.48   0.628    -.4183796    .6928965
  v2xpa_popul |  -.3582295   .1499092    -2.39   0.017    -.6520462   -.0644129
        _cons |  -1.663458   .7147296    -2.33   0.020    -3.064303   -.2626141
--------------+----------------------------------------------------------------
countryid     |
    var(_cons)|   1.337056   .6035369                      .5519801    3.238735
-------------------------------------------------------------------------------
LR test vs. probit model: chibar2(01) = 1132.02       Prob >= chibar2 = 0.0000

.                         margins,dydx(v2paind v2xpa_popul)

Average marginal effects                                 Number of obs = 4,039
Model VCE: OIM

Expression: Marginal predicted mean, predict()
dy/dx wrt:  v2paind v2xpa_popul

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |   .2963242    .054907     5.40   0.000     .1887084      .40394
 v2xpa_popul |   -.078248    .034104    -2.29   0.022    -.1450906   -.0114053
------------------------------------------------------------------------------

. 
.                         * Hybrid model *
.                         xthybrid leadernom $d,clusterid(countryid)p cre


Correlated random effects model. Family: gaussian. Link: identity.

+-----------------------------------+
|             Variable |   model    |
|----------------------+------------|
| leadernom            |            |
|           W__v2paind |     0.3098 |
|                      |     0.0000 |
|           D__v2paind |     0.6109 |
|                      |     0.1286 |
|                _cons |     0.0075 |
|                      |     0.9557 |
|----------------------+------------|
| var(_cons[countryid])|            |
|                _cons |     0.0496 |
|                      |     0.0085 |
|----------------------+------------|
|      var(e.leadernom)|            |
|                _cons |     0.1180 |
|                      |     0.0000 |
|----------------------+------------|
| Statistics           |            |
|                   ll | -2150.7118 |
|                 chi2 |   112.5019 |
|                    p |     0.0000 |
|                  aic |  4311.4235 |
|                  bic |  4344.9551 |
+-----------------------------------+
                          Legend: b/p
Level 1: 6041 units. Level 2: 14 units.

. 
.                         * Plot substantive effect from baseline model as partials
>  *
.                         qui reg $d i.idcyp

.                         qui predict x if e(sample)==1,xb

.                         qui reg leadernom   i.idcyp

.                         qui predict y if e(sample)==1,xb

.                         qui sum x

.                         qui replace x=(x+abs(r(min)))/(abs(r(min))+r(max))

.                         qui sum y

.                         qui replace y=(y+abs(r(min)))/(abs(r(min))+r(max))

.                         sum x y

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
           x |      9,849    .2724542    .2112922   2.50e-16          1
           y |      5,487    .2926587    .3405105          0          1

.                         twoway lpoly y x,legend(off)xtit("Party personalism (part
> ial)") ///
>                                 ytit("Party elite experience (partial)",)bw(.3) /
> //
>                                 tit(Elites in more personalist parties are more l
> ikely to be nominated by leader)

.                         drop x y

. 
.                         ** Model specification checks in a CRE probit *
.                         xi:xthybrid leadernom $d age,clusterid(countryid)p cre


Correlated random effects model. Family: gaussian. Link: identity.

+-----------------------------------+
|             Variable |   model    |
|----------------------+------------|
| leadernom            |            |
|               W__age |     0.0019 |
|                      |     0.0001 |
|           W__v2paind |     0.3040 |
|                      |     0.0000 |
|           D__v2paind |     0.7122 |
|                      |     0.1667 |
|               D__age |    -0.0061 |
|                      |     0.5480 |
|                _cons |     0.2038 |
|                      |     0.6756 |
|----------------------+------------|
| var(_cons[countryid])|            |
|                _cons |     0.0497 |
|                      |     0.0151 |
|----------------------+------------|
|      var(e.leadernom)|            |
|                _cons |     0.1335 |
|                      |     0.0000 |
|----------------------+------------|
| Statistics           |            |
|                   ll | -1694.0746 |
|                 chi2 |    80.9004 |
|                    p |     0.0000 |
|                  aic |  3402.1493 |
|                  bic |  3446.2808 |
+-----------------------------------+
                          Legend: b/p
Level 1: 4042 units. Level 2: 12 units.

.                         xi:xthybrid leadernom $d age male,clusterid(countryid)p c
> re


Correlated random effects model. Family: gaussian. Link: identity.

+-----------------------------------+
|             Variable |   model    |
|----------------------+------------|
| leadernom            |            |
|              W__male |     0.0009 |
|                      |     0.9410 |
|               W__age |     0.0019 |
|                      |     0.0001 |
|           W__v2paind |     0.3040 |
|                      |     0.0000 |
|           D__v2paind |     0.5636 |
|                      |     0.2918 |
|               D__age |    -0.0120 |
|                      |     0.3299 |
|              D__male |     0.5484 |
|                      |     0.4221 |
|                _cons |     0.1605 |
|                      |     0.7363 |
|----------------------+------------|
| var(_cons[countryid])|            |
|                _cons |     0.0470 |
|                      |     0.0152 |
|----------------------+------------|
|      var(e.leadernom)|            |
|                _cons |     0.1335 |
|                      |     0.0000 |
|----------------------+------------|
| Statistics           |            |
|                   ll | -1691.8508 |
|                 chi2 |    82.1004 |
|                    p |     0.0000 |
|                  aic |  3401.7015 |
|                  bic |  3458.4353 |
+-----------------------------------+
                          Legend: b/p
Level 1: 4039 units. Level 2: 12 units.

.                         xi:xthybrid leadernom $d age male i.education,clusterid(c
> ountryid)p cre
i.education       _Ieducation_1-5     (_Ieducation_1 for education==-1 omitted)


Correlated random effects model. Family: gaussian. Link: identity.

+-----------------------------------+
|             Variable |   model    |
|----------------------+------------|
| leadernom            |            |
|              W__male |     0.0037 |
|                      |     0.7656 |
|               W__age |     0.0020 |
|                      |     0.0001 |
|           W__v2paind |     0.3088 |
|                      |     0.0000 |
|     W___Ieducation_2 |     0.0708 |
|                      |     0.2387 |
|     W___Ieducation_3 |     0.0815 |
|                      |     0.2345 |
|     W___Ieducation_4 |     0.0555 |
|                      |     0.3344 |
|     W___Ieducation_5 |     0.1211 |
|                      |     0.0324 |
|     B___Ieducation_2 |    -0.9024 |
|                      |     0.0152 |
|     B___Ieducation_3 |    -5.7003 |
|                      |     0.0000 |
|     B___Ieducation_4 |    -1.1279 |
|                      |     0.0005 |
|           D__v2paind |     0.7847 |
|                      |     0.0685 |
|               D__age |     0.0592 |
|                      |     0.0004 |
|              D__male |    -2.1009 |
|                      |     0.0000 |
|     D___Ieducation_5 |     0.3564 |
|                      |     0.0319 |
|                _cons |    -1.3623 |
|                      |     0.0269 |
|----------------------+------------|
| var(_cons[countryid])|            |
|                _cons |     0.0096 |
|                      |     0.0227 |
|----------------------+------------|
|      var(e.leadernom)|            |
|                _cons |     0.1329 |
|                      |     0.0000 |
|----------------------+------------|
| Statistics           |            |
|                   ll | -1673.5140 |
|                 chi2 |   163.0046 |
|                    p |     0.0000 |
|                  aic |  3381.0281 |
|                  bic |  3488.1918 |
+-----------------------------------+
                          Legend: b/p
Level 1: 4039 units. Level 2: 12 units.

.                         xi:xthybrid leadernom $d age male i.education v2paseat op
> position incentive,clusterid(countryid)p cre
i.education       _Ieducation_1-5     (_Ieducation_1 for education==-1 omitted)

The variable 'incentive' does not vary sufficiently within clusters
and will not be used to create additional regressors.
[0% of the total variance in 'incentive' is within clusters]

Correlated random effects model. Family: gaussian. Link: identity.

+-----------------------------------+
|             Variable |   model    |
|----------------------+------------|
| leadernom            |            |
|         R__incentive |     0.1178 |
|                      |     0.4380 |
|              W__male |     0.0049 |
|                      |     0.6941 |
|               W__age |     0.0019 |
|                      |     0.0001 |
|     W__v2paseatshare |    -0.0039 |
|                      |     0.0000 |
|           W__v2paind |     0.3154 |
|                      |     0.0000 |
|        W__opposition |    -0.1284 |
|                      |     0.0000 |
|     W___Ieducation_2 |     0.0660 |
|                      |     0.2653 |
|     W___Ieducation_3 |     0.1060 |
|                      |     0.1172 |
|     W___Ieducation_4 |     0.0672 |
|                      |     0.2355 |
|     W___Ieducation_5 |     0.1239 |
|                      |     0.0265 |
|     B___Ieducation_2 |    -1.2383 |
|                      |     0.0007 |
|     B___Ieducation_3 |    -6.4559 |
|                      |     0.2855 |
|     B___Ieducation_4 |    -1.4947 |
|                      |     0.5098 |
|           D__v2paind |     0.9498 |
|                      |     0.1698 |
|               D__age |     0.0612 |
|                      |     0.5957 |
|              D__male |    -3.2743 |
|                      |     0.0000 |
|     D___Ieducation_5 |     0.3972 |
|                      |     0.6916 |
|     D__v2paseatshare |    -0.0002 |
|                      |     0.9924 |
|        D__opposition |     1.2892 |
|                      |     0.2075 |
|                _cons |    -1.4222 |
|                      |     0.7501 |
|----------------------+------------|
| var(_cons[countryid])|            |
|                _cons |     0.0044 |
|                      |     0.0391 |
|----------------------+------------|
|      var(e.leadernom)|            |
|                _cons |     0.1291 |
|                      |     0.0000 |
|----------------------+------------|
| Statistics           |            |
|                   ll | -1611.6415 |
|                 chi2 |   369.4539 |
|                    p |     0.0000 |
|                  aic |  3267.2829 |
|                  bic |  3405.9655 |
+-----------------------------------+
                          Legend: b/p
Level 1: 4039 units. Level 2: 12 units.

. 
.                         * Within estimators *
.                         reg leadernom $d   

      Source |       SS           df       MS      Number of obs   =     6,041
-------------+----------------------------------   F(1, 6039)      =    677.49
       Model |   117.83511         1   117.83511   Prob > F        =    0.0000
    Residual |  1050.35128     6,039  .173928015   R-squared       =    0.1009
-------------+----------------------------------   Adj R-squared   =    0.1007
       Total |  1168.18639     6,040  .193408343   Root MSE        =    .41705

------------------------------------------------------------------------------
   leadernom | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |   .6527043   .0250763    26.03   0.000     .6035458    .7018628
       _cons |   .0798415   .0088199     9.05   0.000     .0625513    .0971318
------------------------------------------------------------------------------

.                         xtreg leadernom $d,i(countryid)  
warning: existing panel variable is not countryid

Random-effects GLS regression                   Number of obs     =      6,041
Group variable: countryid                       Number of groups  =         14

R-squared:                                      Obs per group:
     Within  = 0.0175                                         min =         92
     Between = 0.2743                                         avg =      431.5
     Overall = 0.1009                                         max =      1,109

                                                Wald chi2(1)      =     109.74
corr(u_i, X) = 0 (assumed)                      Prob > chi2       =     0.0000

------------------------------------------------------------------------------
   leadernom | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |   .3127249   .0298521    10.48   0.000     .2542159    .3712339
       _cons |   .1899621   .0650111     2.92   0.003     .0625427    .3173815
-------------+----------------------------------------------------------------
     sigma_u |  .24004718
     sigma_e |  .34347033
         rho |  .32815744   (fraction of variance due to u_i)
------------------------------------------------------------------------------

.                         xtreg leadernom $d,fe i(countryid) 

Fixed-effects (within) regression               Number of obs     =      6,041
Group variable: countryid                       Number of groups  =         14

R-squared:                                      Obs per group:
     Within  = 0.0175                                         min =         92
     Between = 0.2743                                         avg =      431.5
     Overall = 0.1009                                         max =      1,109

                                                F(1, 6026)        =     107.21
corr(u_i, Xb) = 0.2957                          Prob > F          =     0.0000

------------------------------------------------------------------------------
   leadernom | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |   .3098083   .0299211    10.35   0.000     .2511522    .3684643
       _cons |   .1755603   .0094494    18.58   0.000     .1570361    .1940845
-------------+----------------------------------------------------------------
     sigma_u |  .24996765
     sigma_e |  .34347033
         rho |  .34625578   (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(13, 6026) = 221.34                  Prob > F = 0.0000

.                         xi:reghdfe leadernom $d age male i.education v2paseat opp
> osition,a(countryid) cluster(v2paid)
i.education       _Ieducation_1-5     (_Ieducation_1 for education==-1 omitted)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      4,039
Absorbing 1 HDFE group                            F(   9,     62) =       2.75
Statistics robust to heteroskedasticity           Prob > F        =     0.0091
                                                  R-squared       =     0.3833
                                                  Adj R-squared   =     0.3803
                                                  Within R-sq.    =     0.0509
Number of clusters (v2paid)  =         63         Root MSE        =     0.3597

                                 (Std. err. adjusted for 63 clusters in v2paid)
-------------------------------------------------------------------------------
              |               Robust
    leadernom | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
      v2paind |   .3154456   .1222392     2.58   0.012     .0710929    .5597983
          age |   .0019159    .000735     2.61   0.011     .0004466    .0033852
         male |   .0048687   .0158985     0.31   0.760    -.0269119    .0366493
_Ieducation_2 |    .065981   .0412388     1.60   0.115    -.0164542    .1484162
_Ieducation_3 |   .1059649   .0511129     2.07   0.042     .0037917    .2081382
_Ieducation_4 |   .0672183   .0425984     1.58   0.120    -.0179347    .1523712
_Ieducation_5 |   .1239378   .0441074     2.81   0.007     .0357683    .2121072
v2paseatshare |  -.0038631   .0019722    -1.96   0.055    -.0078056    .0000793
   opposition |  -.1284017   .0512464    -2.51   0.015    -.2308417   -.0259617
        _cons |   .1679845   .0599707     2.80   0.007     .0481048    .2878642
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
   countryid |        12           0          12     |
-----------------------------------------------------+

.                         
.                         * Among candidates and non-candidates
.                         xthybrid leadernom $d if candidate==0,clusterid(countryid
> )p cre


Correlated random effects model. Family: gaussian. Link: identity.

+-----------------------------------+
|             Variable |   model    |
|----------------------+------------|
| leadernom            |            |
|           W__v2paind |     0.3549 |
|                      |     0.0000 |
|           D__v2paind |     0.5725 |
|                      |     0.1083 |
|                _cons |    -0.0034 |
|                      |     0.9773 |
|----------------------+------------|
| var(_cons[countryid])|            |
|                _cons |     0.0415 |
|                      |     0.0089 |
|----------------------+------------|
|      var(e.leadernom)|            |
|                _cons |     0.1138 |
|                      |     0.0000 |
|----------------------+------------|
| Statistics           |            |
|                   ll | -1491.6084 |
|                 chi2 |   119.2438 |
|                    p |     0.0000 |
|                  aic |  2993.2168 |
|                  bic |  3025.1534 |
+-----------------------------------+
                          Legend: b/p
Level 1: 4391 units. Level 2: 14 units.

.                         xthybrid leadernom $d if candidate==1,clusterid(countryid
> )p cre


Correlated random effects model. Family: gaussian. Link: identity.

+-----------------------------------+
|             Variable |   model    |
|----------------------+------------|
| leadernom            |            |
|           W__v2paind |     0.2252 |
|                      |     0.0011 |
|           D__v2paind |     0.4798 |
|                      |     0.4184 |
|                _cons |     0.1275 |
|                      |     0.5378 |
|----------------------+------------|
| var(_cons[countryid])|            |
|                _cons |     0.0722 |
|                      |     0.0204 |
|----------------------+------------|
|      var(e.leadernom)|            |
|                _cons |     0.1252 |
|                      |     0.0000 |
|----------------------+------------|
| Statistics           |            |
|                   ll |  -650.2255 |
|                 chi2 |    12.0723 |
|                    p |     0.0024 |
|                  aic |  1310.4510 |
|                  bic |  1337.4937 |
+-----------------------------------+
                          Legend: b/p
Level 1: 1650 units. Level 2: 11 units.

.                         
.                         * Compare only ruling parties using original party person
> alism *
.                         xi:krls leadernom persparty age male i.education v2paseat
>  opposition incentive v2xpa_popul
i.education       _Ieducation_1-5     (_Ieducation_1 for education==-1 omitted)
Iteration =  1, Looloss: 235.7514  
Iteration =  2, Looloss: 218.7845  
Iteration =  3, Looloss: 199.0906  
Iteration =  4, Looloss: 178.7735  
Iteration =  5, Looloss: 160.2579  
Iteration =  6, Looloss: 145.1673  
Iteration =  7, Looloss: 133.825   
Iteration =  8, Looloss: 125.6287  
Iteration =  9, Looloss: 119.7198  
Iteration = 10, Looloss: 115.4098  
Iteration = 11, Looloss: 112.2722  
Iteration = 12, Looloss: 110.0735  
Iteration = 13, Looloss: 108.6866  

Pointwise Derivatives                                       Number of obs =      58
> 7 
                                                            Lambda        =    .539
> 2 
                                                            Tolerance     =     .58
> 7 
                                                            Sigma         =       1
> 0 
                                                            Eff. df       =    50.9
> 4 
                                                            R2            =    .684
> 6 
                                                            Looloss       =    107.
> 9

     leadernom |      Avg.       SE        t    P>|t|        P25       P50       P7
> 5       
---------------+-------------------------------------------------------------------
> -
     persparty |  .860216   .063899   13.462    0.000    .614122   .902051   1.1132
> 4  
           age |  .000567   .000983    0.577    0.564   -.002984   .000794   .00470
> 6  
         *male |  .021569   .033447    0.645    0.519     -.0498   .007181   .13614
> 7  
*_Ieducation_3 | -.098881   .064583   -1.531    0.126   -.476393   .093365   .18513
> 3  
*_Ieducation_4 |   .06614   .047566    1.390    0.165    .010533   .100401   .14218
> 6  
*_Ieducation_5 |  .069008   .026612    2.593    0.010    .007369   .061777   .11210
> 6  
 v2paseatshare |  .012029   .001041   11.555    0.000    .007172   .010982   .01700
> 9  
   *opposition |  .178585   .031788    5.618    0.000    .097781    .18001   .27639
> 3  
     incentive |  -.01054   .007234   -1.457    0.146   -.034414  -.008024   .01518
> 9  
   v2xpa_popul |  .327789   .060047    5.459    0.000    .017296   .292883   .63944
> 3  
---------------+-------------------------------------------------------------------
> -


.                         
.                         
.                 
. ***********************************
. ***** Cabinet tenure analysis *****
. ***********************************     
.                 use "$dir\pers-use.dta",clear

.                 sort cowcode year

.                 save, replace
file
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\pers-use
    > .dta saved

.                 /*
>                 import excel "WhoGov_crosssectional_V1.2.xlsx",firstrow clear
>                 destring year,replace
>                 keep if year>=1989
>                 save whogov,replace
>                 */
.                 use "$dir\whogov.dta",clear

.                 gen country = country_name

.                 gen cowcode =.
(4,782 missing values generated)

.                 qui do cowcodes

.                 replace cowcode = 484 if country_name=="Congo - Brazzaville"
(28 real changes made)

.                 replace cowcode = 490 if country_name=="Congo - Kinshasa"
(30 real changes made)

.                 replace cowcode = 437 if country_name=="Côte d'Ivoire"
(0 real changes made)

.                 replace cowcode = 316 if country_name=="Czechia"
(24 real changes made)

.                 tab country if cowcode==.

                              country |      Freq.     Percent        Cum.
--------------------------------------+-----------------------------------
                        Côte d’Ivoire |         28       17.18       17.18
                         East Germany |          1        0.61       17.79
                             Eswatini |         28       17.18       34.97
                           Montenegro |         20       12.27       47.24
                      Myanmar (Burma) |         28       17.18       64.42
                      North Macedonia |         22       13.50       77.91
People's Democratic Republic of Yemen |          1        0.61       78.53
                          South Sudan |          5        3.07       81.60
                  São Tomé & Príncipe |         30       18.40      100.00
--------------------------------------+-----------------------------------
                                Total |        163      100.00

.                 drop if cowcode==.
(163 observations deleted)

.                 drop country

.                 rename country_name whogov_country 

.                 sort cowcode year

.                 merge cowcode year using "$dir\pers-use.dta"
(you are using old merge syntax; see [D] merge for new syntax)
variables cowcode year do not uniquely identify observations in the master data
(variable year was int, now double to accommodate using data's values)
(variable cowcode was float, now double to accommodate using data's values)

.                 tab _merge

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |      2,557       51.65       51.65
          2 |        332        6.71       58.35
          3 |      2,062       41.65      100.00
------------+-----------------------------------
      Total |      4,951      100.00

.                 tab country if _merge==2  & year<2017

                                country |      Freq.     Percent        Cum.
----------------------------------------+-----------------------------------
                               Bulgaria |          1        2.56        2.56
                            Ivory Coast |          5       12.82       15.38
                                 Kosovo |          8       20.51       35.90
                              Macedonia |         25       64.10      100.00
----------------------------------------+-----------------------------------
                                  Total |         39      100.00

.                  gen repeat=year==year[_n-1] if cowcode==cowcode[_n-1]
(257 missing values generated)

.                  drop if repeat
(263 observations deleted)

.                  drop repeat

.                  drop if _merge==1
(2,396 observations deleted)

.                  tsset cowcode year

Panel variable: cowcode (unbalanced)
 Time variable: year, 1991 to 2020, but with gaps
         Delta: 1 unit

.                  rename _merge mergeA

.                  tsset cowcode year

Panel variable: cowcode (unbalanced)
 Time variable: year, 1991 to 2020, but with gaps
         Delta: 1 unit

.                  merge cowcode year using leadermatch
(you are using old merge syntax; see [D] merge for new syntax)

.                  tab _merge

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |          3        0.13        0.13
          2 |          6        0.26        0.39
          3 |      2,289       99.61      100.00
------------+-----------------------------------
      Total |      2,298      100.00

.                  drop _merge  

. 
.                    * Variables *
.                 gen tenure = average_core 
(246 missing values generated)

.                 gen election = v2xel_elecpres==1 | v2xel_elecparl==1

.                 xtset cowcode year

Panel variable: cowcode (unbalanced)
 Time variable: year, 1991 to 2020, but with gaps
         Delta: 1 unit

.                 gen f1election = f1.election
(217 missing values generated)

.                 gen l1election = l.election
(217 missing values generated)

.                 gen l2election = l2.election
(299 missing values generated)

.                 gen postelection = l1election==1 | l2election==1

.                 gen corenum = ln(n_core)
(246 missing values generated)

.                 swilk n_core corenum

                   Shapiro–Wilk W test for normal data

    Variable |        Obs       W           V         z       Prob>z
-------------+------------------------------------------------------
      n_core |      2,052    0.91501    103.173    11.805    0.00000
     corenum |      2,052    0.97763     27.158     8.407    0.00000

Note: The normal approximation to the sampling distribution of W'
      is valid for 4<=n<=2000.

.                 gen coremil = ln(1+n_militarytitle_core)
(246 missing values generated)

.                 gen anymil = n_militarytitle_core>=1 if n_militarytitle_core~=.
(246 missing values generated)

.                 replace ivdem = ivdem*10  /* rescale to plot point estimate */
(2,292 real changes made)

.                  
.                         * T-tests with create party *
.                                 gen e = .
(2,298 missing values generated)

.                                 gen hi = . 
(2,298 missing values generated)

.                                 gen lo = .
(2,298 missing values generated)

.                                 gen n = _n

.                 ttest tenure if leadermatch==1,by(create)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |   1,280    3.851465    .0425284    1.521543    3.768032    3.934898
       1 |     485    3.081232    .0512093    1.127769    2.980612    3.181852
---------+--------------------------------------------------------------------
Combined |   1,765    3.639815    .0348679    1.464867    3.571428    3.708201
---------+--------------------------------------------------------------------
    diff |            .7702331     .075946                .6212795    .9191867
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  10.1419
H0: diff = 0                                     Degrees of freedom =     1763

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000

.                 ttest average_core if leadermatch==1,by(create)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |   1,280    3.851465    .0425284    1.521543    3.768032    3.934898
       1 |     485    3.081232    .0512093    1.127769    2.980612    3.181852
---------+--------------------------------------------------------------------
Combined |   1,765    3.639815    .0348679    1.464867    3.571428    3.708201
---------+--------------------------------------------------------------------
    diff |            .7702331     .075946                .6212795    .9191867
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  10.1419
H0: diff = 0                                     Degrees of freedom =     1763

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000

.                 local  m1=r(mu_1) 

.                 local se1 = r(sd_1)/(sqrt(r(N_1)))

.                 local  m2=r(mu_2)

.                 local se2 = r(sd_2)/(sqrt(r(N_2)))

.                 replace e=`m1' if _n==1
(1 real change made)

.                 replace hi = `m1' + 1.96* `se1' if _n==1
(1 real change made)

.                 replace lo = `m1' - 1.96* `se1'  if _n==1
(1 real change made)

.                 replace e=`m2' if _n==2
(1 real change made)

.                 replace hi = `m2' + 1.96*`se2' if _n==2
(1 real change made)

.                 replace lo = `m2' - 1.96*`se2' if _n==2 
(1 real change made)

.                 twoway (bar e n if n<=2,barwidth(.5)bcol(gs13)ytit("Average tenur
> e (years)")saving(h1.gph,replace)) ///
>                         (rspike hi lo n if n<=2,ylab(2(.5)4)col(gs1)legend(off)xt
> it("")tit(Core appointees) ///
>                         xlab(1 "No party creation" 2 "Leader creates party")xscal
> e(range(.8 2.2)))
file h1.gph saved

.                 ttest average_min if leadermatch==1,by(create)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |   1,280    3.343264    .0387712    1.387119    3.267202    3.419326
       1 |     485    2.670834    .0461735    1.016865    2.580109    2.761559
---------+--------------------------------------------------------------------
Combined |   1,765    3.158489    .0316581    1.330018    3.096397     3.22058
---------+--------------------------------------------------------------------
    diff |            .6724303    .0691063                .5368913    .8079692
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   9.7304
H0: diff = 0                                     Degrees of freedom =     1763

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000

.                 local  m1=r(mu_1) 

.                 local se1 = r(sd_1)/(sqrt(r(N_1)))

.                 local  m2=r(mu_2)

.                 local se2 = r(sd_2)/(sqrt(r(N_2)))

.                 replace e=`m1' if _n==1
(1 real change made)

.                 replace hi = `m1' + 1.96* `se1' if _n==1
(1 real change made)

.                 replace lo = `m1' - 1.96* `se1'  if _n==1
(1 real change made)

.                 replace e=`m2' if _n==2
(1 real change made)

.                 replace hi = `m2' + 1.96*`se2' if _n==2
(1 real change made)

.                 replace lo = `m2' - 1.96*`se2' if _n==2 
(1 real change made)

.                 twoway (bar e n if n<=2,barwidth(.5)bcol(gs13)ytit("Average tenur
> e (years)")saving(h2.gph,replace)) ///
>                         (rspike hi lo n if n<=2,ylab(2(.5)4)col(gs1)legend(off)xt
> it("")tit(Ministerial appointees) ///
>                         xlab(1 "No party creation" 2 "Leader creates party")xscal
> e(range(.8 2.2)))
file h2.gph saved

.                 ttest average_tot if leadermatch==1,by(create)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |   1,280    3.751627     .038696     1.38443    3.675712    3.827541
       1 |     485    2.986311    .0458806    1.010415    2.896162    3.076461
---------+--------------------------------------------------------------------
Combined |   1,765    3.541328    .0318155    1.336632    3.478927    3.603728
---------+--------------------------------------------------------------------
    diff |            .7653155     .068921                .6301399     .900491
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  11.1042
H0: diff = 0                                     Degrees of freedom =     1763

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000

.                 local  m1=r(mu_1) 

.                 local se1 = r(sd_1)/(sqrt(r(N_1)))

.                 local  m2=r(mu_2)

.                 local se2 = r(sd_2)/(sqrt(r(N_2)))

.                 replace e=`m1' if _n==1
(1 real change made)

.                 replace hi = `m1' + 1.95* `se1' if _n==1
(1 real change made)

.                 replace lo = `m1' - 1.95* `se1'  if _n==1
(1 real change made)

.                 replace e=`m2' if _n==2
(1 real change made)

.                 replace hi = `m2' + 1.95*`se2' if _n==2
(1 real change made)

.                 replace lo = `m2' - 1.95*`se2' if _n==2 
(1 real change made)

.                 twoway (bar e n if n<=2,barwidth(.5)bcol(gs13)ytit("Average tenur
> e (years)")saving(h3.gph,replace)) ///
>                         (rspike hi lo n if n<=2,ylab(2(.5)4)col(gs1)legend(off)xt
> it("")tit(All appointees) ///
>                         xlab(1 "No party creation" 2 "Leader creates party")xscal
> e(range(.8 2.2)))
file h3.gph saved

.                 gr combine h1.gph h2.gph h3.gph, xsize(4)ysize(2)col(3)

.                 gr export "$dir\golden\Ch3-Cabinet-Tenure-By-Create.pdf",as(pdf)r
> eplace 
file
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\golden\C
    > h3-Cabinet-Tenure-By-Create.pdf saved as PDF format

.                 erase h1.gph

.                 erase h2.gph

.                 erase h3.gph

.                 drop e n hi lo

. 
.                         * Check t-tests within-country *
.                 local var ="average_core average_total average_min"

.                 foreach v of local var {        
  2.                         qui reghdfe `v' create,a(cowcode)cluster(lid)
  3.                         lincom create
  4.                 }

 ( 1)  create = 0

------------------------------------------------------------------------------
average_core | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.2588677   .1017903    -2.54   0.011    -.4588476   -.0588877
------------------------------------------------------------------------------

 ( 1)  create = 0

------------------------------------------------------------------------------
average_to~l | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   -.254522   .0877221    -2.90   0.004    -.4268632   -.0821809
------------------------------------------------------------------------------

 ( 1)  create = 0

------------------------------------------------------------------------------
average_mi~r | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   -.206782   .0889415    -2.32   0.020    -.3815188   -.0320452
------------------------------------------------------------------------------

. 
.                  * No covariate specification *
.                 reghdfe tenure persparty if leadermatch==1,vce(cluster lid)a(xper
> iod*)
(MWFE estimator converged in 5 iterations)

HDFE Linear regression                            Number of obs   =      1,765
Absorbing 6 HDFE groups                           F(   1,    463) =      52.84
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1125
                                                  Adj R-squared   =     0.1090
                                                  Within R-sq.    =     0.0893
Number of clusters (lid)     =        464         Root MSE        =     1.3827

                                  (Std. err. adjusted for 464 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
      tenure | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
   persparty |  -1.875811   .2580508    -7.27   0.000    -2.382907   -1.368716
       _cons |   4.608281   .1647602    27.97   0.000      4.28451    4.932051
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
    xperiod1 |         2           0           2     |
    xperiod2 |         2           1           1     |
    xperiod3 |         2           1           1    ?|
    xperiod4 |         2           1           1    ?|
    xperiod5 |         2           1           1    ?|
    xperiod6 |         2           1           1    ?|
-----------------------------------------------------+
? = number of redundant parameters may be higher

.                 est store tenure0

.                                 
.                  * Partial regression plot *
.                 xi:qui reg average_core i.leadertime ld ivdem pres i.v2elparlel p
> ostelection n_party corenum xperiod* if leadermatch==1
i.leadertimei~r   _Ileadertim_0-14    (naturally coded; _Ileadertim_0 omitted)
i.v2elparlel      _Iv2elparle_0-3     (naturally coded; _Iv2elparle_0 omitted)

.                 qui predict y1 if e(sample),res

.                 xi:qui reg persparty i.leadertime ld ivdem pres i.v2elparlel post
> election n_party corenum xperiod* if leadermatch==1
i.leadertimei~r   _Ileadertim_0-14    (naturally coded; _Ileadertim_0 omitted)
i.v2elparlel      _Iv2elparle_0-3     (naturally coded; _Iv2elparle_0 omitted)

.                 qui predict x1 if e(sample),res

.                 sum y1 average_core if leadermatch==1

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
          y1 |      1,747   -1.53e-09    1.072163  -3.178544   4.038272
average_core |      1,765    3.639815    1.464867          1   9.105263

.                 gen yhat = (3.33+y1)^1.07
(551 missing values generated)

.                 sum y1 yhat average_core if leadermatch==1

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
          y1 |      1,747   -1.53e-09    1.072163  -3.178544   4.038272
        yhat |      1,747    3.636482    1.251802   .1327113    8.47386
average_core |      1,765    3.639815    1.464867          1   9.105263

.                 qui sum x1 

.                 replace x1 = (x1 + abs(r(min)))/(abs(r(min))+ r(max))
(1,747 real changes made)

.                 twoway (lpolyci yhat x1,degree(1)level(90) bw(.15)legend(off)xtit
> le("Ruling party personalism, partial") ///
>                         ytit("Cabinet tenure years, partial")ylab(2(1)5)) (lowess
>  yhat x1,lcol(gs1)lpat(dash)legend(off))

.                 drop x1 y1 yhat

.                 gr export "$dir\golden\Ch3-Pers-Party-Cabinet-Tenure.pdf",as(pdf)
> replace 
file
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\golden\C
    > h3-Pers-Party-Cabinet-Tenure.pdf saved as PDF format

. 
.                  * Specifications to report *
.                 reghdfe tenure ld ivdem persparty if leadermatch==1,vce(cluster l
> id)a(year leadertime)
(dropped 2 singleton observations)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =      1,745
Absorbing 2 HDFE groups                           F(   3,    456) =      31.24
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.3953
                                                  Adj R-squared   =     0.3804
                                                  Within R-sq.    =     0.1531
Number of clusters (lid)     =        457         Root MSE        =     1.1543

                                  (Std. err. adjusted for 457 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
      tenure | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
          ld |   .2963997   .0720573     4.11   0.000     .1547941    .4380053
       ivdem |  -.0766652   .0446353    -1.72   0.087    -.1643817    .0110512
   persparty |  -1.376452   .2970329    -4.63   0.000    -1.960175   -.7927287
       _cons |   4.003662   .3818033    10.49   0.000     3.253349    4.753974
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------+
       Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------------+---------------------------------------|
              year |        28           0          28     |
 leadertimeinpower |        13           1          12     |
-----------------------------------------------------------+

.                 est store tenure1

.                 xi:reghdfe tenure ld ivdem persparty pres i.v2elparlel postelecti
> on n_party corenum ///
>                         if leadermatch==1,vce(cluster lid)a(year leadertime)
i.v2elparlel      _Iv2elparle_0-3     (naturally coded; _Iv2elparle_0 omitted)
(dropped 2 singleton observations)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =      1,745
Absorbing 2 HDFE groups                           F(  10,    456) =      21.80
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.4908
                                                  Adj R-squared   =     0.4761
                                                  Within R-sq.    =     0.2868
Number of clusters (lid)     =        457         Root MSE        =     1.0615

                                   (Std. err. adjusted for 457 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
       tenure | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
           ld |   .2451979   .0675475     3.63   0.000     .1124549     .377941
        ivdem |  -.0988303   .0442566    -2.23   0.026    -.1858024   -.0118582
    persparty |  -1.092097   .2608099    -4.19   0.000    -1.604635   -.5795583
         pres |  -.8147053   .1070803    -7.61   0.000    -1.025137   -.6042733
_Iv2elparle_1 |  -.0611324   .1402331    -0.44   0.663    -.3367156    .2144509
_Iv2elparle_2 |  -.4556055   .1425213    -3.20   0.001    -.7356855   -.1755255
_Iv2elparle_3 |  -.5528868   .5360713    -1.03   0.303    -1.606363    .5005898
 postelection |  -.3309451   .0637322    -5.19   0.000    -.4561903   -.2056999
      n_party |   .0592516   .0288484     2.05   0.041     .0025594    .1159439
      corenum |   .0292343   .2076086     0.14   0.888    -.3787539    .4372225
        _cons |   4.614841   .6959754     6.63   0.000     3.247124    5.982558
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------+
       Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------------+---------------------------------------|
              year |        28           0          28     |
 leadertimeinpower |        13           1          12     |
-----------------------------------------------------------+

.                 est store tenure2

.                 reghdfe tenure ld ivdem persparty postelection if leadermatch==1,
> vce(cluster lid)a(cowcode year leadertime)
(dropped 7 singleton observations)
(MWFE estimator converged in 8 iterations)

HDFE Linear regression                            Number of obs   =      1,740
Absorbing 3 HDFE groups                           F(   4,    451) =      21.63
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.6926
                                                  Adj R-squared   =     0.6664
                                                  Within R-sq.    =     0.0755
Number of clusters (lid)     =        452         Root MSE        =     0.8458

                                  (Std. err. adjusted for 452 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
      tenure | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
          ld |   .5276437    .096182     5.49   0.000     .3386231    .7166643
       ivdem |  -.0476017   .0634225    -0.75   0.453     -.172242    .0770386
   persparty |  -.8608892   .1980115    -4.35   0.000    -1.250029   -.4717495
postelection |  -.3354942   .0539612    -6.22   0.000    -.4415408   -.2294476
       _cons |   3.000277    .459059     6.54   0.000     2.098116    3.902437
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------+
       Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------------+---------------------------------------|
           cowcode |        95           0          95     |
              year |        28           1          27     |
 leadertimeinpower |        13           1          12    ?|
-----------------------------------------------------------+
? = number of redundant parameters may be higher

.                 est store tenure3

. 
.                   * Additional specifications *
.                 reghdfe tenure ld ivdem persparty i_pop pres i.v2elparlel postele
> ction n_party corenum if leadermatch==1,vce(cluster lid)a(year leadertime)
(dropped 2 singleton observations)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =      1,690
Absorbing 2 HDFE groups                           F(  11,    440) =      19.18
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.4990
                                                  Adj R-squared   =     0.4837
                                                  Within R-sq.    =     0.2904
Number of clusters (lid)     =        441         Root MSE        =     1.0569

                                  (Std. err. adjusted for 441 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
      tenure | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
          ld |   .2631677   .0672953     3.91   0.000     .1309076    .3954278
       ivdem |  -.1018302   .0440598    -2.31   0.021    -.1884239   -.0152364
   persparty |  -1.153699   .2710139    -4.26   0.000    -1.686341    -.621056
  i_populism |   .5668148   .2448548     2.31   0.021     .0855845    1.048045
        pres |  -.8772018   .1123071    -7.81   0.000    -1.097927   -.6564768
             |
  v2elparlel |
          1  |  -.0752087   .1409442    -0.53   0.594    -.3522163    .2017989
          2  |  -.4551954   .1485789    -3.06   0.002    -.7472081   -.1631828
          3  |  -1.416009   .2579302    -5.49   0.000    -1.922937   -.9090802
             |
postelection |  -.3385324    .064018    -5.29   0.000    -.4643516   -.2127133
     n_party |   .0736282   .0305196     2.41   0.016     .0136458    .1336106
     corenum |  -.0657018   .2021246    -0.33   0.745    -.4629515     .331548
       _cons |   4.699212   .6910152     6.80   0.000     3.341111    6.057312
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------+
       Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------------+---------------------------------------|
              year |        28           0          28     |
 leadertimeinpower |        13           1          12     |
-----------------------------------------------------------+

.                 xi:reghdfe average_total ld ivdem persparty pres i.v2elparlel pos
> telection n_party corenum if leadermatch==1,vce(cluster lid)a(year leadertime)
i.v2elparlel      _Iv2elparle_0-3     (naturally coded; _Iv2elparle_0 omitted)
(dropped 2 singleton observations)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =      1,745
Absorbing 2 HDFE groups                           F(  10,    456) =      30.00
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.5003
                                                  Adj R-squared   =     0.4858
                                                  Within R-sq.    =     0.3383
Number of clusters (lid)     =        457         Root MSE        =     0.9597

                                   (Std. err. adjusted for 457 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
average_total | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
           ld |   .2735545   .0606832     4.51   0.000     .1543011    .3928079
        ivdem |  -.0970804   .0419175    -2.32   0.021    -.1794557    -.014705
    persparty |   -1.02808   .2278803    -4.51   0.000    -1.475906   -.5802543
         pres |  -.8511811   .1010148    -8.43   0.000    -1.049693   -.6526689
_Iv2elparle_1 |   .0237209   .1217783     0.19   0.846    -.2155955    .2630372
_Iv2elparle_2 |  -.3116837   .1254156    -2.49   0.013     -.558148   -.0652194
_Iv2elparle_3 |  -.5270205   .5135725    -1.03   0.305    -1.536283    .4822418
 postelection |  -.3537421   .0575304    -6.15   0.000    -.4667998   -.2406845
      n_party |    .040769   .0252427     1.62   0.107    -.0088374    .0903754
      corenum |   .0663955   .1916749     0.35   0.729    -.3102802    .4430712
        _cons |   4.285009   .6573875     6.52   0.000     2.993125    5.576894
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------+
       Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------------+---------------------------------------|
              year |        28           0          28     |
 leadertimeinpower |        13           1          12     |
-----------------------------------------------------------+

.                 est store tenure4

.                 xi:reghdfe average_minister ld ivdem persparty pres i.v2elparlel 
> postelection n_party corenum if leadermatch==1,vce(cluster lid)a(year leadertime)
i.v2elparlel      _Iv2elparle_0-3     (naturally coded; _Iv2elparle_0 omitted)
(dropped 2 singleton observations)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =      1,745
Absorbing 2 HDFE groups                           F(  10,    456) =      20.11
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.4556
                                                  Adj R-squared   =     0.4398
                                                  Within R-sq.    =     0.2477
Number of clusters (lid)     =        457         Root MSE        =     0.9973

                                   (Std. err. adjusted for 457 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
average_min~r | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
           ld |   .2264241    .061482     3.68   0.000      .105601    .3472472
        ivdem |  -.0940401   .0475864    -1.98   0.049    -.1875561   -.0005242
    persparty |  -.9697237    .231618    -4.19   0.000    -1.424895   -.5145527
         pres |  -.6665698   .1074141    -6.21   0.000    -.8776578   -.4554817
_Iv2elparle_1 |  -.0235469   .1314644    -0.18   0.858    -.2818982    .2348043
_Iv2elparle_2 |  -.3371039   .1333386    -2.53   0.012    -.5991382   -.0750696
_Iv2elparle_3 |  -.7558147    .353051    -2.14   0.033    -1.449623    -.062006
 postelection |  -.3163863   .0591536    -5.35   0.000    -.4326337   -.2001389
      n_party |   .0419548   .0257351     1.63   0.104    -.0086193    .0925288
      corenum |   .1780397   .2051213     0.87   0.386    -.2250605      .58114
        _cons |   3.567895    .728554     4.90   0.000     2.136155    4.999635
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------+
       Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------------+---------------------------------------|
              year |        28           0          28     |
 leadertimeinpower |        13           1          12     |
-----------------------------------------------------------+

.                 est store tenure5

.                 
.                  * Stronger in presidential + parl-majority *
.                  gen sqtenure = tenure^(1/2)
(246 missing values generated)

.                  swilk tenure sqtenure if leadermatch==1

                   Shapiro–Wilk W test for normal data

    Variable |        Obs       W           V         z       Prob>z
-------------+------------------------------------------------------
      tenure |      1,765    0.96870     33.135     8.864    0.00000
    sqtenure |      1,765    0.99427      6.061     4.563    0.00000

.                 xi:reghdfe sqtenure ld ivdem persparty i.v2elparlel postelection 
> n_party corenum ///
>                         if leadermatch==1 & (pres==1 | (pres==0 & v2paseat>=50 & 
> v2paseat~=.)),vce(cluster lid)a(year leadertime)
i.v2elparlel      _Iv2elparle_0-3     (naturally coded; _Iv2elparle_0 omitted)
(dropped 2 singleton observations)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =      1,082
Absorbing 2 HDFE groups                           F(   9,    261) =       5.24
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.4453
                                                  Adj R-squared   =     0.4195
                                                  Within R-sq.    =     0.1447
Number of clusters (lid)     =        262         Root MSE        =     0.2833

                                   (Std. err. adjusted for 262 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
     sqtenure | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
           ld |   .0340827   .0231002     1.48   0.141    -.0114037    .0795691
        ivdem |  -.0154401   .0152657    -1.01   0.313    -.0454998    .0146195
    persparty |  -.3722029   .0892025    -4.17   0.000    -.5478511   -.1965548
_Iv2elparle_1 |  -.0199129   .0446739    -0.45   0.656      -.10788    .0680543
_Iv2elparle_2 |  -.1406588   .0426691    -3.30   0.001    -.2246783   -.0566393
_Iv2elparle_3 |  -.0413563    .090963    -0.45   0.650    -.2204709    .1377584
 postelection |  -.0450955    .022291    -2.02   0.044    -.0889886   -.0012024
      n_party |   .0013613   .0090337     0.15   0.880    -.0164268    .0191495
      corenum |   .1191015   .0765052     1.56   0.121    -.0315445    .2697476
        _cons |   1.718896   .2616895     6.57   0.000     1.203604    2.234187
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------+
       Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------------+---------------------------------------|
              year |        28           0          28     |
 leadertimeinpower |        13           1          12     |
-----------------------------------------------------------+

.                 xi:reghdfe sqtenure ld ivdem persparty i.v2elparlel postelection 
> n_party corenum ///
>                         if leadermatch==1 & (pres==0 & v2paseat<50 & v2paseat~=.)
> ,vce(cluster lid)a(year leadertime)    
i.v2elparlel      _Iv2elparle_0-3     (naturally coded; _Iv2elparle_0 omitted)
(MWFE estimator converged in 7 iterations)

HDFE Linear regression                            Number of obs   =        606
Absorbing 2 HDFE groups                           F(   9,    191) =      13.96
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.5148
                                                  Adj R-squared   =     0.4729
                                                  Within R-sq.    =     0.2833
Number of clusters (lid)     =        192         Root MSE        =     0.2701

                                   (Std. err. adjusted for 192 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
     sqtenure | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
           ld |    .154428   .0242143     6.38   0.000     .1066662    .2021899
        ivdem |   -.064901   .0236706    -2.74   0.007    -.1115903   -.0182116
    persparty |  -.1606214   .1208398    -1.33   0.185    -.3989733    .0777306
_Iv2elparle_1 |  -.0730257   .0692801    -1.05   0.293    -.2096781    .0636267
_Iv2elparle_2 |  -.1158312   .0745182    -1.55   0.122    -.2628155     .031153
_Iv2elparle_3 |  -.4516876   .1108428    -4.08   0.000    -.6703207   -.2330544
 postelection |  -.1249783   .0250728    -4.98   0.000    -.1744334   -.0755231
      n_party |   .0293905   .0136767     2.15   0.033     .0024137    .0563672
      corenum |  -.3371819   .0876102    -3.85   0.000    -.5099897    -.164374
        _cons |   3.070361   .3389272     9.06   0.000      2.40184    3.738882
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------+
       Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------------+---------------------------------------|
              year |        28           0          28     |
 leadertimeinpower |        13           1          12     |
-----------------------------------------------------------+

.                 xi:interflex sqtenure persparty v2paseat ld ivdem i.v2elparlel po
> stelection n_party corenum  ///
>                         if leadermatch==1 & (pres==0), cluster(lid)fe(year leader
> time)cut(45)
i.v2elparlel      _Iv2elparle_0-3     (naturally coded; _Iv2elparle_0 omitted)
p value of Wald test: 0.9784

.                         mat list r(estBin)

r(estBin)[2,5]
            x0    bin_marg      bin_se    bin_CI_l    bin_CI_u
r1       30.75  -.15762305   .13110449  -.41458313   .09933702
r2          53  -.28440034   .15414394  -.58651691   .01771624

.                         
.                  * Plot estimates *
.                 label  var _Iv2elparle_1  `""Majoritarian" "(Proportional)""'

.                 label  var _Iv2elparle_2   `""Mixed     " "(Proportional)""'

.                 label  var ld  "Democracy age"

.                 label  var ivdem `""Initial democracy"     "level         ""'

.                 label  var persparty  "{bf:Party personalism}"

.                 label  var pres  `""Presidential  " "(Parliamentary)""'

.                 label  var postelection  "Post-election"

.                 label  var n_party "# of parties"

.                 label  var party_share "Party share"

.                 label  var corenum "# of positions"

.                 coefplot (tenure1, msymbol(d))(tenure2, msymbol(P)) (tenure3, msy
> mbol(T)), order(persparty ld ivdem postelection)  ///
>                         drop(_cons _Iv2elparle_3) xline(0) msymbol(d) mfcolor(whi
> te) grid(glcolor(gs15)) ///
>                         levels(95 90) legend(lab(3 "Baseline")lab(6 "Covariate ad
> justment") lab(9 "Within comparison")order(3 6 9) ///
>                         size(small) pos(6) col(3) ring(1)) xsize(2) ysize(2) xlab
> (-1.5(.5)1)  ///
>                         xtitle("        Coefficient estimate", size(small))  ///
>                         ciopts(lwidth(thin)) aspectratio(1.1) scale(.75) title(Ca
> binet appointee tenure, size(medium) height(2))
(note:  named style P not found in class symbol, default attributes used)

.                 gr export "$dir\golden\Ch3-Pers-Party-Cabinet-Tenure-Estimates.pd
> f",as(pdf)replace 
file
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\golden\C
    > h3-Pers-Party-Cabinet-Tenure-Estimates.pdf saved as PDF format

.                 
.                 
.                 coefplot (tenure4, msymbol(d))(tenure2, msymbol(T))(tenure5, msym
> bol(P)), order(persparty ld ivdem postelection)  ///
>                         drop(_cons _Iv2elparle_3) xline(0)  mfcolor(white) grid(g
> lcolor(gs15)) ///
>                         levels(95 90) legend(lab(3 "All appointees")lab(6 "Core e
> lite") lab(9 "Cabinet members only") order(3 6 9) ///
>                         size(small) pos(6) col(3) ring(1)) xsize(2) ysize(2) xlab
> (-1.5(.5)1)  ///
>                         xtitle("        Coefficient estimate", size(small))  ///
>                         ciopts(lwidth(thin)) aspectratio(1.1) scale(.75) title(Ca
> binet appointee tenure, size(medium) height(2))
(note:  named style P not found in class symbol, default attributes used)

.                 gr export "$dir\golden\T-WhoGov-Cabinet-Tenure-Estimates.pdf",as(
> pdf)replace 
file
    C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\golden\T
    > -WhoGov-Cabinet-Tenure-Estimates.pdf saved as PDF format

.                 
.                  * Retention rate, core *
.                  gen retain = retention_rate_core
(246 missing values generated)

.                  gen retain2 = retention_rateadj_core
(247 missing values generated)

.                  recode retain retain2 (0=.001) (1=.999)
(391 changes made to retain)
(388 changes made to retain2)

.                  sum retain retain2 if leadermatch==1

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
      retain |      1,765    .6987674    .2920369       .001       .999
     retain2 |      1,764    .7062224    .2904292       .001       .999

.                  betareg retain i.year ld ivdem persparty pres i.v2elparlel poste
> lection n_party corenum ///
>                         if leadermatch==1,vce(cluster lid)link(loglog)slink(log)
Initial:      Log pseudolikelihood =  -770.1195
Rescale:      Log pseudolikelihood =  699.28664
Rescale eq:   Log pseudolikelihood =  856.66991
(setting technique to bhhh)
Iteration 0:  Log pseudolikelihood =  856.66991  
Iteration 1:  Log pseudolikelihood =  859.43026  
Iteration 2:  Log pseudolikelihood =   869.8357  
Iteration 3:  Log pseudolikelihood =  872.52333  
Iteration 4:  Log pseudolikelihood =   872.6152  
Iteration 5:  Log pseudolikelihood =  873.10817  
Iteration 6:  Log pseudolikelihood =   873.2083  
Iteration 7:  Log pseudolikelihood =   873.3741  
Iteration 8:  Log pseudolikelihood =  873.39435  
Iteration 9:  Log pseudolikelihood =  873.46432  
(switching technique to nr)
Iteration 10: Log pseudolikelihood =    873.819  
Iteration 11: Log pseudolikelihood =  874.01041  
Iteration 12: Log pseudolikelihood =  874.04418  
Iteration 13: Log pseudolikelihood =  874.04423  

Beta regression                                 Number of obs     =      1,765
                                                Wald chi2(38)     =    2321.43
                                                Prob > chi2       =     0.0000

Link function        :  g(u) = -log(-log(u))    [Log-log]
Slink function       :  g(u) = log(u)           [Log]

Log pseudolikelihood =  874.04423

                                  (Std. err. adjusted for 464 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
      retain | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
retain       |
        year |
       1992  |    .104669   .1998929     0.52   0.601    -.2871139    .4964519
       1993  |   .1033622   .1971538     0.52   0.600    -.2830521    .4897765
       1994  |   .3885558    .183609     2.12   0.034     .0286887    .7484229
       1995  |   .3428535    .192569     1.78   0.075    -.0345748    .7202818
       1996  |   .6461053   .1662761     3.89   0.000     .3202101    .9720005
       1997  |   .4822503    .167833     2.87   0.004     .1533036     .811197
       1998  |   .6210417   .1873378     3.32   0.001     .2538664     .988217
       1999  |   .3930498   .1854612     2.12   0.034     .0295526     .756547
       2000  |    .249086   .1785052     1.40   0.163    -.1007778    .5989499
       2001  |   .4678456   .1820541     2.57   0.010     .1110262    .8246651
       2002  |    .407726   .1788977     2.28   0.023     .0570929    .7583591
       2003  |   .5587947   .1710212     3.27   0.001     .2235994      .89399
       2004  |   .7109152   .1656721     4.29   0.000     .3862039    1.035626
       2005  |   .4393256   .1733277     2.53   0.011     .0996094    .7790417
       2006  |   .4591005   .1711155     2.68   0.007     .1237202    .7944808
       2007  |   .4781892   .1692406     2.83   0.005     .1464838    .8098946
       2008  |   .5604126   .1660592     3.37   0.001     .2349426    .8858826
       2009  |   .4851255   .1691586     2.87   0.004     .1535808    .8166702
       2010  |   .6049285   .1772933     3.41   0.001     .2574401    .9524169
       2011  |   .6018417   .1710566     3.52   0.000     .2665769    .9371065
       2012  |   .3577783   .1754552     2.04   0.041     .0138924    .7016642
       2013  |   .4914126   .1644488     2.99   0.003     .1690989    .8137264
       2014  |   .5703978   .1837362     3.10   0.002     .2102815    .9305141
       2015  |   .4460838   .1741015     2.56   0.010     .1048511    .7873165
       2016  |   .6342996   .1746462     3.63   0.000     .2919993    .9765999
       2017  |   .2182775   .2283803     0.96   0.339    -.2293397    .6658947
       2018  |   .4053761   .2167813     1.87   0.061    -.0195075    .8302596
       2019  |   .1158677   .1625499     0.71   0.476    -.2027243    .4344597
       2020  |   .3129294   .1622799     1.93   0.054    -.0051333     .630992
             |
          ld |   .1288852   .0361015     3.57   0.000     .0581275    .1996428
       ivdem |  -.0415615   .0235162    -1.77   0.077    -.0876524    .0045295
   persparty |  -.2490366   .1269098    -1.96   0.050    -.4977752   -.0002981
        pres |  -.1261719   .0547063    -2.31   0.021    -.2333943   -.0189494
             |
  v2elparlel |
          1  |  -.0853836   .0627867    -1.36   0.174    -.2084433     .037676
          2  |   -.196528     .06931    -2.84   0.005    -.3323731   -.0606829
          3  |   -.383916   .5818517    -0.66   0.509    -1.524324    .7564924
             |
postelection |  -.2189502   .0460681    -4.75   0.000     -.309242   -.1286584
     n_party |   .0142711   .0135561     1.05   0.292    -.0122985    .0408406
     corenum |  -.0595445    .111005    -0.54   0.592    -.2771102    .1580212
       _cons |   .8988723   .4417029     2.04   0.042     .0331506    1.764594
-------------+----------------------------------------------------------------
scale        |
       _cons |    .252949   .0371876     6.80   0.000     .1800625    .3258354
------------------------------------------------------------------------------

.                  betareg retain2 i.year ld ivdem persparty pres i.v2elparlel post
> election n_party corenum ///
>                         if leadermatch==1,vce(cluster lid)link(loglog)slink(log)
Initial:      Log pseudolikelihood = -879.57115
Rescale:      Log pseudolikelihood =  717.48349
Rescale eq:   Log pseudolikelihood =  885.07104
(setting technique to bhhh)
Iteration 0:  Log pseudolikelihood =  885.07104  
Iteration 1:  Log pseudolikelihood =   895.8522  
Iteration 2:  Log pseudolikelihood =  899.20929  
Iteration 3:  Log pseudolikelihood =  900.71926  
Iteration 4:  Log pseudolikelihood =  901.33599  
Iteration 5:  Log pseudolikelihood =  901.38219  
Iteration 6:  Log pseudolikelihood =  901.40827  
Iteration 7:  Log pseudolikelihood =  901.54679  
Iteration 8:  Log pseudolikelihood =  901.60028  
Iteration 9:  Log pseudolikelihood =  901.63627  
(switching technique to nr)
Iteration 10: Log pseudolikelihood =  901.63848  (backed up)
Iteration 11: Log pseudolikelihood =  901.66503  
Iteration 12: Log pseudolikelihood =  901.66509  

Beta regression                                 Number of obs     =      1,764
                                                Wald chi2(38)     =    2220.94
                                                Prob > chi2       =     0.0000

Link function        :  g(u) = -log(-log(u))    [Log-log]
Slink function       :  g(u) = log(u)           [Log]

Log pseudolikelihood =  901.66509

                                  (Std. err. adjusted for 464 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
     retain2 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
retain2      |
        year |
       1992  |   .0850282   .2008941     0.42   0.672    -.3087171    .4787734
       1993  |  -.0029926   .1994693    -0.02   0.988    -.3939454    .3879601
       1994  |   .2636394   .1970617     1.34   0.181    -.1225944    .6498732
       1995  |   .2416003    .205824     1.17   0.240    -.1618073    .6450079
       1996  |   .5936625   .1861336     3.19   0.001     .2288473    .9584776
       1997  |   .4266657   .1882563     2.27   0.023     .0576901    .7956413
       1998  |   .4862371   .2023765     2.40   0.016     .0895865    .8828876
       1999  |    .242007    .193782     1.25   0.212    -.1377988    .6218128
       2000  |   .2983328     .20195     1.48   0.140    -.0974819    .6941476
       2001  |   .4164152   .1989736     2.09   0.036     .0264341    .8063963
       2002  |    .307122   .1926299     1.59   0.111    -.0704256    .6846696
       2003  |   .5052852    .190674     2.65   0.008     .1315711    .8789993
       2004  |   .5959876    .181508     3.28   0.001     .2402384    .9517368
       2005  |   .3288509   .1863134     1.77   0.078    -.0363165    .6940184
       2006  |   .4324592   .1913448     2.26   0.024     .0574303    .8074882
       2007  |   .3814361   .1840315     2.07   0.038     .0207409    .7421313
       2008  |   .4508198   .1810299     2.49   0.013     .0960077    .8056318
       2009  |   .3649725   .1849623     1.97   0.048      .002453     .727492
       2010  |   .4631878    .190661     2.43   0.015     .0894991    .8368765
       2011  |   .4987494   .1903075     2.62   0.009     .1257535    .8717453
       2012  |   .2729819   .1895892     1.44   0.150    -.0986062      .64457
       2013  |    .427568   .1848649     2.31   0.021     .0652396    .7898965
       2014  |   .5234186   .2011005     2.60   0.009     .1292688    .9175684
       2015  |   .4073899   .1903891     2.14   0.032     .0342341    .7805457
       2016  |   .6650042   .1915164     3.47   0.001      .289639    1.040369
       2017  |   .1331324   .2242878     0.59   0.553    -.3064636    .5727283
       2018  |   .3415765   .2268867     1.51   0.132    -.1031132    .7862662
       2019  |   .0503689   .1762452     0.29   0.775    -.2950653    .3958031
       2020  |    .248413   .1760615     1.41   0.158    -.0966613    .5934873
             |
          ld |   .1048151   .0355146     2.95   0.003     .0352078    .1744225
       ivdem |  -.0338434   .0235144    -1.44   0.150    -.0799308     .012244
   persparty |  -.2578657   .1221693    -2.11   0.035    -.4973132   -.0184182
        pres |   -.152595    .053384    -2.86   0.004    -.2572258   -.0479643
             |
  v2elparlel |
          1  |  -.1000998   .0601529    -1.66   0.096    -.2179973    .0177978
          2  |  -.2290528   .0679811    -3.37   0.001    -.3622934   -.0958122
          3  |  -.6500844   .4837477    -1.34   0.179    -1.598212    .2980437
             |
postelection |  -.1811958   .0454981    -3.98   0.000    -.2703704   -.0920212
     n_party |   .0094832   .0130302     0.73   0.467    -.0160555     .035022
     corenum |   .1067168   .1112904     0.96   0.338    -.1114083     .324842
       _cons |   .5359377   .4414767     1.21   0.225    -.3293407    1.401216
-------------+----------------------------------------------------------------
scale        |
       _cons |   .2598239   .0379226     6.85   0.000     .1854969    .3341509
------------------------------------------------------------------------------

. 
.  ************** THE END ******************
. 
. log close
      name:  <unnamed>
       log:  C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\FKTW-reproduction\C
> h3.log
  log type:  text
 closed on:  26 Jul 2023, 16:05:34
-----------------------------------------------------------------------------------
